Fix duplicated startup version string
authorRafal Harabien <rafalh@reactos.org>
Sat, 26 Mar 2011 21:41:49 +0000 (21:41 +0000)
committerRafal Harabien <rafalh@reactos.org>
Sat, 26 Mar 2011 21:41:49 +0000 (21:41 +0000)
Patch by Thomas Faber <thfabba at gmx dot de>
See issue #6015 for more details.

svn path=/trunk/; revision=51165

reactos/ntoskrnl/ex/init.c

index f614cf6..302d1ff 100644 (file)
@@ -1410,10 +1410,13 @@ Phase1InitializationDiscard(IN PVOID Context)
     else
     {
         /* No version */
-        *EndBuffer++ = ANSI_NULL; /* Null-terminate the string */
-        --Remaining;
+        *EndBuffer = ANSI_NULL; /* Null-terminate the string */
     }
 
+    /* Skip over the null-terminator to start a new string */
+    ++EndBuffer;
+    --Remaining;
+
     /* Build the version number */
     StringBuffer = InitBuffer->VersionNumber;
     Status = RtlStringCbPrintfA(StringBuffer,