Fixed alloca problem with gcc
This commit is contained in:
parent
e1b24c65d2
commit
1717358968
@ -167,7 +167,11 @@ bool strwild(const char* str, const char* wild) {
|
|||||||
if(wild[1] == NUL)
|
if(wild[1] == NUL)
|
||||||
return true;
|
return true;
|
||||||
else {
|
else {
|
||||||
|
#ifdef _MSC_VER
|
||||||
char *buf = (char *)alloca(strlen(wild));
|
char *buf = (char *)alloca(strlen(wild));
|
||||||
|
#else
|
||||||
|
__extension__ char buf[strlen(wild)];
|
||||||
|
#endif
|
||||||
strcpy(buf, wild+1);
|
strcpy(buf, wild+1);
|
||||||
char* ptr = strpbrk(buf, "*?");
|
char* ptr = strpbrk(buf, "*?");
|
||||||
if(ptr)
|
if(ptr)
|
||||||
|
Reference in New Issue
Block a user