[KERNEL32]
authorThomas Faber <thomas.faber@reactos.org>
Wed, 25 Nov 2015 10:06:03 +0000 (10:06 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 25 Nov 2015 10:06:03 +0000 (10:06 +0000)
- Set the full BOOL in CheckNameLegalDOS8Dot3, not just the low byte. Fixes some kernel32:file test failures.

svn path=/trunk/; revision=70107

reactos/dll/win32/kernel32/client/file/filename.c

index 6e1a42a..7077ce9 100644 (file)
@@ -328,6 +328,7 @@ CheckNameLegalDOS8Dot3W(
 {
     UNICODE_STRING Name;
     ANSI_STRING AnsiName;
+    BOOLEAN NameContainsSpaces;
 
     if(lpName == NULL ||
        (lpOemName == NULL && OemNameSize != 0) ||
@@ -348,7 +349,9 @@ CheckNameLegalDOS8Dot3W(
 
     *pbNameLegal = RtlIsNameLegalDOS8Dot3(&Name,
                                           (lpOemName ? &AnsiName : NULL),
-                                          (BOOLEAN*)pbNameContainsSpaces);
+                                          &NameContainsSpaces);
+    if (*pbNameLegal && pbNameContainsSpaces)
+        *pbNameContainsSpaces = NameContainsSpaces;
 
     return TRUE;
 }
@@ -370,6 +373,7 @@ CheckNameLegalDOS8Dot3A(
     UNICODE_STRING Name;
     ANSI_STRING AnsiName, AnsiInputName;
     NTSTATUS Status;
+    BOOLEAN NameContainsSpaces;
 
     if(lpName == NULL ||
        (lpOemName == NULL && OemNameSize != 0) ||
@@ -400,7 +404,9 @@ CheckNameLegalDOS8Dot3A(
 
     *pbNameLegal = RtlIsNameLegalDOS8Dot3(&Name,
                                           (lpOemName ? &AnsiName : NULL),
-                                          (BOOLEAN*)pbNameContainsSpaces);
+                                          &NameContainsSpaces);
+    if (*pbNameLegal && pbNameContainsSpaces)
+        *pbNameContainsSpaces = NameContainsSpaces;
 
     RtlFreeUnicodeString(&Name);