mshtml: Fix the buffer length being passed into MultiByteToWideChar in set_registry.

This commit is contained in:
Rob Shearman 2008-04-10 12:01:52 +01:00 committed by Alexandre Julliard
parent a5d47baba4
commit f07152d7b7

View File

@ -113,7 +113,7 @@ static void set_registry(LPCSTR install_dir)
len = MultiByteToWideChar(CP_ACP, 0, install_dir, -1, NULL, 0)-1;
gecko_path = heap_alloc((len+1)*sizeof(WCHAR)+sizeof(wszWineGecko));
MultiByteToWideChar(CP_ACP, 0, install_dir, -1, gecko_path, (len+1)*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, install_dir, -1, gecko_path, len+1);
if (len && gecko_path[len-1] != '\\')
gecko_path[len++] = '\\';