mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
winpgnt.c: fix an outdated error message.
I just spotted it while I was looking through this module anyway. It was using %.100s to prevent an sprintf buffer overflow, which hasn't been necessary since I switched everything over to dupprintf, and also it was printing the integer value of GetLastError() without using my convenient translation wrapper win_strerror.
This commit is contained in:
parent
98528db25a
commit
daa086fe73
@ -1136,8 +1136,8 @@ void spawn_cmd(const char *cmdline, const char *args, int show)
|
||||
if (ShellExecute(NULL, _T("open"), cmdline,
|
||||
args, NULL, show) <= (HINSTANCE) 32) {
|
||||
char *msg;
|
||||
msg = dupprintf("Failed to run \"%.100s\", Error: %d", cmdline,
|
||||
(int)GetLastError());
|
||||
msg = dupprintf("Failed to run \"%s\": %s", cmdline,
|
||||
win_strerror(GetLastError()));
|
||||
MessageBox(NULL, msg, APPNAME, MB_OK | MB_ICONEXCLAMATION);
|
||||
sfree(msg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user