]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix type of 4th argument to WinHelp
authorTim Kosse <tim.kosse@filezilla-project.org>
Tue, 11 Aug 2015 12:07:36 +0000 (14:07 +0200)
committerSimon Tatham <anakin@pobox.com>
Sat, 15 Aug 2015 12:54:46 +0000 (13:54 +0100)
We're passing a pointer as 4th argument to WinHelp. Do not cast it to
DWORD which would truncate the pointer. Instead use UINT_PTR as that
is what WinHelp expects.

windows/winhelp.c

index 8b652c7b15eb49c9f80fd20f34857fe2b7b9310d..64f6ad4597ac1dad4609e57e878a3ff5684bb27d 100644 (file)
@@ -105,7 +105,7 @@ void launch_help(HWND hwnd, const char *topic)
 #endif /* NO_HTMLHELP */
        if (help_path) {
            char *cmd = dupprintf("JI(`',`%.*s')", colonpos, topic);
-           WinHelp(hwnd, help_path, HELP_COMMAND, (DWORD)cmd);
+           WinHelp(hwnd, help_path, HELP_COMMAND, (ULONG_PTR)cmd);
            sfree(cmd);
        }
     } else {