mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 23:55:07 +00:00
Don't adjust the pointer inside the allocation function, otherwise we'll have trouble freeing it later
svn path=/trunk/; revision=30221
This commit is contained in:
parent
abb9904ca4
commit
40e2d21684
|
@ -47,6 +47,10 @@ ParseSettings(LPWSTR lpBuffer)
|
||||||
INT NumSettings = 0;
|
INT NumSettings = 0;
|
||||||
INT s;
|
INT s;
|
||||||
|
|
||||||
|
/* move past unicode byte order */
|
||||||
|
if (lpBuffer[0] == 0xFEFF || lpBuffer[0] == 0xFFFE)
|
||||||
|
lpBuffer += 1;
|
||||||
|
|
||||||
if (lpBuffer)
|
if (lpBuffer)
|
||||||
{
|
{
|
||||||
/* get number of settings */
|
/* get number of settings */
|
||||||
|
@ -149,7 +153,6 @@ ReadRdpFile(HANDLE hFile)
|
||||||
if (bRes)
|
if (bRes)
|
||||||
{
|
{
|
||||||
lpBuffer[BytesRead / 2] = 0;
|
lpBuffer[BytesRead / 2] = 0;
|
||||||
lpBuffer += 1;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -192,3 +195,4 @@ CloseRdpFile(HANDLE hFile)
|
||||||
if (hFile)
|
if (hFile)
|
||||||
CloseHandle(hFile);
|
CloseHandle(hFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue