mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05: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,
|
if (ShellExecute(NULL, _T("open"), cmdline,
|
||||||
args, NULL, show) <= (HINSTANCE) 32) {
|
args, NULL, show) <= (HINSTANCE) 32) {
|
||||||
char *msg;
|
char *msg;
|
||||||
msg = dupprintf("Failed to run \"%.100s\", Error: %d", cmdline,
|
msg = dupprintf("Failed to run \"%s\": %s", cmdline,
|
||||||
(int)GetLastError());
|
win_strerror(GetLastError()));
|
||||||
MessageBox(NULL, msg, APPNAME, MB_OK | MB_ICONEXCLAMATION);
|
MessageBox(NULL, msg, APPNAME, MB_OK | MB_ICONEXCLAMATION);
|
||||||
sfree(msg);
|
sfree(msg);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user