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:
Simon Tatham 2018-07-09 07:18:08 +01:00
Родитель 98528db25a
Коммит daa086fe73
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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);
}