diff options
Diffstat (limited to 'src/thirdparty/unrar/unicode.cpp')
-rw-r--r-- | src/thirdparty/unrar/unicode.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/thirdparty/unrar/unicode.cpp b/src/thirdparty/unrar/unicode.cpp index 9c1080aa7..be3363293 100644 --- a/src/thirdparty/unrar/unicode.cpp +++ b/src/thirdparty/unrar/unicode.cpp @@ -359,7 +359,7 @@ bool UtfToWide(const char *Src,wchar *Dest,size_t DestSize) continue; } if (Dest!=NULL) - if (sizeof(*Dest)==2) // Use the surrogate pair for 2 byte Unicode. + if (sizeof(*Dest)==2) // Use the surrogate pair. { *(Dest++)=((d-0x10000)>>10)+0xd800; *(Dest++)=(d&0x3ff)+0xdc00; @@ -380,7 +380,7 @@ bool UtfToWide(const char *Src,wchar *Dest,size_t DestSize) int wcsicomp(const wchar *s1,const wchar *s2) { #ifdef _WIN_ALL - return CompareStringW(LOCALE_USER_DEFAULT,NORM_IGNORECASE|SORT_STRINGSORT,s1,-1,s2,-1)-2; + return CompareString(LOCALE_USER_DEFAULT,NORM_IGNORECASE|SORT_STRINGSORT,s1,-1,s2,-1)-2; #else while (true) { @@ -476,7 +476,7 @@ int toupperw(int ch) // CharUpper is more reliable than towupper in Windows, which seems to be // C locale dependent even in Unicode version. For example, towupper failed // to convert lowercase Russian characters. - return (int)CharUpper((wchar *)ch); + return (int)(INT_PTR)CharUpper((wchar *)(INT_PTR)ch); #else return towupper(ch); #endif @@ -488,7 +488,7 @@ int tolowerw(int ch) #ifdef _WIN_ALL // CharLower is more reliable than towlower in Windows. // See comment for towupper above. - return (int)CharLower((wchar *)ch); + return (int)(INT_PTR)CharLower((wchar *)(INT_PTR)ch); #else return towlower(ch); #endif |