Initialized the key name before each call to ZwCreateKey in IopCreateDeviceKeyPath. Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c _____
Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c --- trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-03-13 09:06:14 UTC (rev 13997) +++ trunk/reactos/ntoskrnl/io/pnpmgr.c 2005-03-13 09:08:26 UTC (rev 13998) @@ -764,16 +764,15 @@
}
wcsncpy (KeyBuffer, Path, MAX_PATH-1); - RtlInitUnicodeString (&KeyName, KeyBuffer);
/* Skip \Registry\ */ - Current = KeyName.Buffer; - Current = wcschr (Current, '\') + 1; - Current = wcschr (Current, '\') + 1; + Current = KeyBuffer; + Current = wcschr (Current, L'\') + 1; + Current = wcschr (Current, L'\') + 1;
while (TRUE) { - Next = wcschr (Current, '\'); + Next = wcschr (Current, L'\'); if (Next == NULL) { /* The end */ @@ -783,6 +782,7 @@ *Next = 0; }
+ RtlInitUnicodeString (&KeyName, KeyBuffer); InitializeObjectAttributes (&ObjectAttributes, &KeyName, OBJ_CASE_INSENSITIVE,