Commit 201d13a3 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

mshtml: Fixed buffer size to WideCharToMultiByte.

parent 64d41b3d
......@@ -566,7 +566,7 @@ static const elem_type_info_t elem_type_infos[] = {
static int strncmp_wa(LPCWSTR strw, const char *stra, size_t len)
{
WCHAR buf[512];
size_t wlen = MultiByteToWideChar(CP_ACP, 0, stra, len, buf, sizeof(buf));
size_t wlen = MultiByteToWideChar(CP_ACP, 0, stra, len, buf, ARRAY_SIZE(buf));
return wlen == len && memcmp(strw, buf, len * sizeof(WCHAR));
}
......@@ -580,7 +580,7 @@ static BOOL is_prefix_wa(const WCHAR *strw, const char *prefix)
int len, prefix_len;
CHAR buf[512];
len = WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, sizeof(buf), NULL, NULL)-1;
len = WideCharToMultiByte(CP_ACP, 0, strw, -1, buf, ARRAY_SIZE(buf), NULL, NULL)-1;
prefix_len = lstrlenA(prefix);
if(len < prefix_len)
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment