(#2098626)
BugFix: Customized colors weren't used in some areas (#2110218)
BugFix: Zip files were extracted into wrong folder (#2110350)
+ BugFix: Case-sensitive regexp search didn't work (#1991259)
Translation updates:
- German (r5934)
- Russian (#2067785)
}
int ovector[30];
- char compString[200] = {0};
+ int compStringBufLen = _tcslen(pszFindWhere) * sizeof(TCHAR) + 1;
+ char *compString = new char[compStringBufLen];
int stringLen = 0;
- TCHAR * tempName = _tcsdup(pszFindWhere); // Create temp copy for conversions
- TCHAR * cmpStr = _tcsupr(tempName);
#ifdef UNICODE
- stringLen = TransformUcs2ToUtf8(cmpStr, _tcslen(cmpStr),
- compString, sizeof(compString));
+ stringLen = TransformUcs2ToUtf8(pszFindWhere, _tcslen(pszFindWhere),
+ compString, compStringBufLen);
+ compString[stringLen] = '\0';
#else
- strcpy(compString, cmpStr);
+ strncpy(compString, pszFindWhere, compStringBufLen);
stringLen = strlen(compString);
#endif
int result = pcre_exec(regexp, pe, compString, stringLen,
0, 0, ovector, 30);
- free(tempName);
if (result >= 0)
{
pos = ovector[0];
nLen = ovector[1] - ovector[0];
#endif
- }
+ }
else
pos = -1;
+ delete [] compString;
pcre_free(regexp);
pcre_free(pe);
return pos;