Fixed alloca problem with gcc

This commit is contained in:
Alexander S. Aganichev 2003-01-12 12:10:24 +00:00
parent e1b24c65d2
commit 1717358968

View File

@ -167,7 +167,11 @@ bool strwild(const char* str, const char* wild) {
if(wild[1] == NUL)
return true;
else {
#ifdef _MSC_VER
char *buf = (char *)alloca(strlen(wild));
#else
__extension__ char buf[strlen(wild)];
#endif
strcpy(buf, wild+1);
char* ptr = strpbrk(buf, "*?");
if(ptr)