mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 02:41:22 +00:00
[MKHIVE]
Fix a buggy format string (%s --> %S). Add _wcsicmp to rtl.c. svn path=/trunk/; revision=47022
This commit is contained in:
parent
3bb199b692
commit
79b5a24bd4
2 changed files with 30 additions and 1 deletions
|
@ -354,7 +354,7 @@ do_reg_operation(
|
||||||
if (Data == NULL)
|
if (Data == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
DPRINT("setting binary data %s len %d\n", ValueName, Size);
|
DPRINT("setting binary data %S len %d\n", ValueName, Size);
|
||||||
InfHostGetBinaryField (Context, 5, Data, Size, NULL);
|
InfHostGetBinaryField (Context, 5, Data, Size, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -207,3 +207,32 @@ unsigned char BitScanReverse(ULONG * const Index, unsigned long Mask)
|
||||||
}
|
}
|
||||||
return Mask ? 1 : 0;
|
return Mask ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef tolower
|
||||||
|
WCHAR towlower(WCHAR ch)
|
||||||
|
{
|
||||||
|
if (ch < L'A')
|
||||||
|
{
|
||||||
|
return ch;
|
||||||
|
}
|
||||||
|
else if (ch <= L'Z')
|
||||||
|
{
|
||||||
|
return ch + (L'a' - L'A');
|
||||||
|
}
|
||||||
|
|
||||||
|
return ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
int _wcsicmp(PCWSTR cs, PCWSTR ct)
|
||||||
|
{
|
||||||
|
while (towlower(*cs) == towlower(*ct))
|
||||||
|
{
|
||||||
|
if (*cs == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
cs++;
|
||||||
|
ct++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return towlower(*cs) - towlower(*ct);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue