[PATCH v2 1/3] wininet: InternetGetLastResponseInfoW() returns wide chars, not ASCII
Damjan Jovanovic
damjan.jov at gmail.com
Tue Jul 6 13:23:15 CDT 2021
Try 2 reuses MultiByteToWideChar() to find the string length.
Signed-off-by: Damjan Jovanovic <damjan.jov at gmail.com>
---
dlls/wininet/internet.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
-------------- next part --------------
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
index feb25bbc0c5..56d256a02e0 100644
--- a/dlls/wininet/internet.c
+++ b/dlls/wininet/internet.c
@@ -1136,10 +1136,7 @@ BOOL WINAPI InternetGetLastResponseInfoW(LPDWORD lpdwError,
{
*lpdwError = lpwite->dwError;
if (lpwite->dwError)
- {
- memcpy(lpszBuffer, lpwite->response, *lpdwBufferLength);
- *lpdwBufferLength = lstrlenW(lpszBuffer);
- }
+ *lpdwBufferLength = MultiByteToWideChar(CP_ACP, 0, lpwite->response, -1, lpszBuffer, *lpdwBufferLength);
else
*lpdwBufferLength = 0;
}
More information about the wine-devel
mailing list