Fix case-insensitive pattern match for Windwos 9x. Thanks to Ianos Gnatiuc 2:469/335.155
This commit is contained in:
parent
52f60a8ee1
commit
2179b64ed1
@ -64,8 +64,14 @@ void gbmh::init(const char* pattern, bool ignorecase) {
|
|||||||
|
|
||||||
// Copy pattern
|
// Copy pattern
|
||||||
strcpy(pat, pattern);
|
strcpy(pat, pattern);
|
||||||
if(ignore_case)
|
if(ignore_case) {
|
||||||
|
#ifndef _MSC_VER
|
||||||
strupr(pat);
|
strupr(pat);
|
||||||
|
#else /* strupr() is wrong on windows 9x (patch from Ianos Gnatiuc 2:469/335.155) */
|
||||||
|
for(char *ptr = pat; *ptr; ptr++)
|
||||||
|
*ptr = toupper(*ptr);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// initialize skip array
|
// initialize skip array
|
||||||
int i;
|
int i;
|
||||||
|
Reference in New Issue
Block a user