Jacek Caban : mshtml: Add trailing '\' to gecko_path if needed.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jul 3 05:22:50 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 39d0dfa90970f0de0a574b8cbf882e5d6ca8ac70
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=39d0dfa90970f0de0a574b8cbf882e5d6ca8ac70
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Jun 30 23:38:43 2006 +0200
mshtml: Add trailing '\' to gecko_path if needed.
---
dlls/mshtml/install.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c
index cd2a124..bf4463e 100644
--- a/dlls/mshtml/install.c
+++ b/dlls/mshtml/install.c
@@ -94,8 +94,12 @@ static void set_registry(LPCSTR install_
}
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);
More information about the wine-cvs
mailing list