Commit 39d0dfa9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Add trailing '\' to gecko_path if needed.

parent a2e94444
......@@ -94,8 +94,12 @@ static void set_registry(LPCSTR install_dir)
}
len = MultiByteToWideChar(CP_ACP, 0, install_dir, -1, NULL, 0)-1;
gecko_path = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR)+sizeof(wszWineGecko));
MultiByteToWideChar(CP_ACP, 0, install_dir, -1, gecko_path, -1);
gecko_path = HeapAlloc(GetProcessHeap(), 0, (len+1)*sizeof(WCHAR)+sizeof(wszWineGecko));
MultiByteToWideChar(CP_ACP, 0, install_dir, -1, gecko_path, (len+1)*sizeof(WCHAR));
if (len && gecko_path[len-1] != '\\')
gecko_path[len++] = '\\';
memcpy(gecko_path+len, wszWineGecko, sizeof(wszWineGecko));
size = len*sizeof(WCHAR)+sizeof(wszWineGecko);
......
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