Fix mistake in 1414b30

This commit is contained in:
Birunthan Mohanathas 2013-10-21 19:41:36 +03:00
parent 1414b3022e
commit 5aabd3fe1a

View File

@ -1541,8 +1541,11 @@ BYTE* DownloadUrl(HINTERNET handle, std::wstring& url, DWORD* dataSize, bool for
hUrlDump = InternetOpenUrlA(handle, urlACP.c_str(), nullptr, 0, flags, 0);
}
if (!hUrlDump)
{
return nullptr;
}
}
// Allocate buffer with 3 extra bytes for triple null termination in case the string is
// invalid (e.g. when incorrectly using the UTF-16LE codepage for the data).