- don't trim spaces at the end of a value as it might be part of the value
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Wed, 2 Jul 2008 13:40:49 +0000 (13:40 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Wed, 2 Jul 2008 13:40:49 +0000 (13:40 +0000)
- fixes the boot menu timeout text disalignment from bug 3437
- behaviour verified with Microsoft Windows Vista SP2+

svn path=/trunk/; revision=34259

reactos/dll/win32/kernel32/misc/profile.c

index b735feb..810b159 100644 (file)
@@ -435,7 +435,7 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding)
 
         /* get rid of white space */
         while (szLineStart < szLineEnd && PROFILE_isspaceW(*szLineStart)) szLineStart++;
-        while ((szLineEnd > szLineStart) && ((szLineEnd[-1] == '\n') || PROFILE_isspaceW(szLineEnd[-1]))) szLineEnd--;
+        while ((szLineEnd > szLineStart) && ((szLineEnd[-1] == '\n') || (PROFILE_isspaceW(szLineEnd[-1]) && szLineEnd[-1] != ' '))) szLineEnd--;
 
         if (szLineStart >= szLineEnd)
             continue;