diff options
Diffstat (limited to 'utilities.cpp')
-rw-r--r-- | utilities.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/utilities.cpp b/utilities.cpp index c481b85..c3f7c94 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -149,11 +149,17 @@ tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){ #define NEWTSTR_ALLOCA(A) (A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A)
const int Stricmp(const TCHAR *str, const TCHAR *substr)
{
+ int i;
TCHAR *str_up = NEWTSTR_ALLOCA(str);
TCHAR *substr_up = NEWTSTR_ALLOCA(substr);
CharUpperBuff(str_up, lstrlen(str_up));
CharUpperBuff(substr_up, lstrlen(substr_up));
+
+ i = _tcscmp(str_up, substr_up);
+
+ mir_free(str_up);
+ mir_free(substr_up);
- return _tcscmp(str_up, substr_up);
+ return i;
}
|