From 1fbcf6ef74f28168342c6f314055d865a2ce21f0 Mon Sep 17 00:00:00 2001 From: spx Date: Thu, 30 Jun 2011 09:18:00 +0000 Subject: [PATCH] Added support code for r839 when using CodePage=1200 with an incorrect string. --- Plugins/PluginWebParser/WebParser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/PluginWebParser/WebParser.cpp b/Plugins/PluginWebParser/WebParser.cpp index d4cbba55..cf391bb8 100644 --- a/Plugins/PluginWebParser/WebParser.cpp +++ b/Plugins/PluginWebParser/WebParser.cpp @@ -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;