ntdll: The closing brace of a guid string is at index 37.
This commit is contained in:
parent
1f882cd68d
commit
ec6a5175b4
|
@ -1997,7 +1997,7 @@ NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING str, GUID* guid)
|
|||
/* Convert string: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
|
||||
* to memory: DWORD... WORD WORD BYTES............
|
||||
*/
|
||||
while (i < 37)
|
||||
while (i <= 37)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
|
|
|
@ -1672,6 +1672,9 @@ static void test_RtlIntegerToChar(void)
|
|||
static const WCHAR szGuid[] = { '{','0','1','0','2','0','3','0','4','-',
|
||||
'0','5','0','6','-' ,'0','7','0','8','-','0','9','0','A','-',
|
||||
'0','B','0','C','0','D','0','E','0','F','0','A','}','\0' };
|
||||
static const WCHAR szGuid2[] = { '{','0','1','0','2','0','3','0','4','-',
|
||||
'0','5','0','6','-' ,'0','7','0','8','-','0','9','0','A','-',
|
||||
'0','B','0','C','0','D','0','E','0','F','0','A',']','\0' };
|
||||
DEFINE_GUID(IID_Endianess, 0x01020304, 0x0506, 0x0708, 0x09, 0x0A, 0x0B,
|
||||
0x0C, 0x0D, 0x0E, 0x0F, 0x0A);
|
||||
|
||||
|
@ -1687,6 +1690,12 @@ static void test_RtlGUIDFromString(void)
|
|||
ret = pRtlGUIDFromString(&str, &guid);
|
||||
ok(ret == 0, "expected ret=0, got 0x%0lx\n", ret);
|
||||
ok(memcmp(&guid, &IID_Endianess, sizeof(guid)) == 0, "Endianess broken\n");
|
||||
|
||||
str.Length = str.MaximumLength = (sizeof(szGuid2) - 1) / sizeof(WCHAR);
|
||||
str.Buffer = (LPWSTR)szGuid2;
|
||||
|
||||
ret = pRtlGUIDFromString(&str, &guid);
|
||||
ok(ret, "expected ret!=0\n");
|
||||
}
|
||||
|
||||
static void test_RtlStringFromGUID(void)
|
||||
|
|
Loading…
Reference in New Issue