CID 1453500 CID 1453489
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/hhctrl.ocx/hhctrl.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 6a98ae4f2e..bd7dfa4230 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -100,7 +100,6 @@ static const char *command_to_string(UINT command) static BOOL resolve_filename(const WCHAR *env_filename, WCHAR *fullname, DWORD buflen, WCHAR **index, WCHAR **window) { const WCHAR *extra; - WCHAR chm_file[MAX_PATH];
static const WCHAR helpW[] = {'\','h','e','l','p','\',0}; static const WCHAR delimW[] = {':',':',0}; @@ -128,9 +127,7 @@ static BOOL resolve_filename(const WCHAR *env_filename, WCHAR *fullname, DWORD b extra = wcsstr(filename, delim2W); if (extra) { - memcpy(chm_file, filename, (extra-filename)*sizeof(WCHAR)); - chm_file[extra-filename] = 0; - filename = chm_file; + filename[extra-filename] = 0; if (window) *window = strdupW(extra+1); } @@ -138,10 +135,7 @@ static BOOL resolve_filename(const WCHAR *env_filename, WCHAR *fullname, DWORD b extra = wcsstr(filename, delimW); if (extra) { - if (filename != chm_file) - memcpy(chm_file, filename, (extra-filename)*sizeof(WCHAR)); - chm_file[extra-filename] = 0; - filename = chm_file; + filename[extra-filename] = 0; if (index) *index = strdupW(extra+2); }