mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 03:08:19 +00:00
ASCII string comparisons should not depend on the locale.
This commit is contained in:
parent
dd72963949
commit
615373c587
|
@ -26,7 +26,6 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
|
@ -389,7 +388,7 @@ LONG WINAPI RtlCompareString( const STRING *s1, const STRING *s2, BOOLEAN CaseIn
|
|||
|
||||
if (CaseInsensitive)
|
||||
{
|
||||
while (!ret && len--) ret = toupper(*p1++) - toupper(*p2++);
|
||||
while (!ret && len--) ret = RtlUpperChar(*p1++) - RtlUpperChar(*p2++);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -481,7 +480,7 @@ BOOLEAN WINAPI RtlPrefixString( const STRING *s1, const STRING *s2, BOOLEAN igno
|
|||
if (ignore_case)
|
||||
{
|
||||
for (i = 0; i < s1->Length; i++)
|
||||
if (toupper(s1->Buffer[i]) != toupper(s2->Buffer[i])) return FALSE;
|
||||
if (RtlUpperChar(s1->Buffer[i]) != RtlUpperChar(s2->Buffer[i])) return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue