Author: gedmurphy Date: Tue Nov 6 17:06:18 2007 New Revision: 30221
URL: http://svn.reactos.org/svn/reactos?rev=30221&view=rev Log: Don't adjust the pointer inside the allocation function, otherwise we'll have trouble freeing it later
Modified: trunk/reactos/base/applications/mstsc/rdpfile.c
Modified: trunk/reactos/base/applications/mstsc/rdpfile.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/rdp... ============================================================================== --- trunk/reactos/base/applications/mstsc/rdpfile.c (original) +++ trunk/reactos/base/applications/mstsc/rdpfile.c Tue Nov 6 17:06:18 2007 @@ -46,6 +46,10 @@ WCHAR lpValue[MAXVALUE]; INT NumSettings = 0; INT s; + + /* move past unicode byte order */ + if (lpBuffer[0] == 0xFEFF || lpBuffer[0] == 0xFFFE) + lpBuffer += 1;
if (lpBuffer) { @@ -149,7 +153,6 @@ if (bRes) { lpBuffer[BytesRead / 2] = 0; - lpBuffer += 1; } else { @@ -192,3 +195,4 @@ if (hFile) CloseHandle(hFile); } +