wine/dlls/kernel profile.c

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 17 05:05:46 CST 2005


ChangeSet ID:	21309
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/17 05:05:46

Modified files:
	dlls/kernel    : profile.c 

Log message:
	Robert Shearman <rob at codeweavers.com>
	The BOM doesn't need a DWORD sized variable, only a WCHAR one.
	Don't increment the szFile pointer since we removed the BOM earlier
	and it will cause the first real character of the INI file to be
	skipped.

Patch: http://cvs.winehq.org/patch.py?id=21309

Old revision  New revision  Changes     Path
 1.29          1.30          +3 -3       wine/dlls/kernel/profile.c

Index: wine/dlls/kernel/profile.c
diff -u -p wine/dlls/kernel/profile.c:1.29 wine/dlls/kernel/profile.c:1.30
--- wine/dlls/kernel/profile.c:1.29	17 Nov 2005 11: 5:46 -0000
+++ wine/dlls/kernel/profile.c	17 Nov 2005 11: 5:46 -0000
@@ -132,7 +132,7 @@ static inline void PROFILE_ByteSwapShort
 static inline void PROFILE_WriteMarker(HANDLE hFile, ENCODING encoding)
 {
     DWORD dwBytesWritten;
-    DWORD bom;
+    WCHAR bom;
     switch (encoding)
     {
     case ENCODING_ANSI:
@@ -373,12 +373,12 @@ static PROFILESECTION *PROFILE_Load(HAND
         break;
     case ENCODING_UTF16LE:
         TRACE("UTF16 Little Endian encoding\n");
-        szFile = (WCHAR *)pBuffer + 1;
+        szFile = (WCHAR *)pBuffer;
         szEnd = (WCHAR *)((char *)pBuffer + dwFileSize);
         break;
     case ENCODING_UTF16BE:
         TRACE("UTF16 Big Endian encoding\n");
-        szFile = (WCHAR *)pBuffer + 1;
+        szFile = (WCHAR *)pBuffer;
         szEnd = (WCHAR *)((char *)pBuffer + dwFileSize);
         PROFILE_ByteSwapShortBuffer(szFile, dwFileSize / sizeof(WCHAR));
         break;



More information about the wine-cvs mailing list