Added support code for r839 when using CodePage=1200 with an incorrect string.

This commit is contained in:
spx 2011-06-30 09:18:00 +00:00
parent 4bfbb120df
commit 1fbcf6ef74

View File

@ -1675,7 +1675,7 @@ BYTE* DownloadUrl(std::wstring& url, DWORD* dwDataSize, bool forceReload)
nBufferSize = *dwDataSize + dwSize;
// Allocate the output buffer.
lpOutPut = new BYTE[nBufferSize + 2];
lpOutPut = new BYTE[nBufferSize + 3];
// Make sure the buffer is not the initial buffer.
if (lpHolding != NULL)
@ -1699,9 +1699,10 @@ BYTE* DownloadUrl(std::wstring& url, DWORD* dwDataSize, bool forceReload)
*dwDataSize += dwSize;
// End with double null
// End with triple null
lpOutPut[dwSize] = 0;
lpOutPut[dwSize + 1] = 0;
lpOutPut[dwSize + 2] = 0;
// Increment the number of buffers read.
++nCounter;