Merge pull request #264 from jpcha2/patch-1

Update miniz_zip.c
This commit is contained in:
Martin Raiber 2023-01-15 12:51:17 +01:00 committed by GitHub
commit 08c03ff478
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ static WCHAR* mz_utf8z_to_widechar(const char* str)
{
int reqChars = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);
WCHAR* wStr = (WCHAR*)malloc(reqChars * sizeof(WCHAR));
MultiByteToWideChar(CP_UTF8, 0, str, -1, wStr, sizeof(WCHAR) * reqChars);
MultiByteToWideChar(CP_UTF8, 0, str, -1, wStr, reqChars);
return wStr;
}