mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- Fixed scanf in IWAD picker without GTK
If you try to kill the program with Ctrl-C, it would run the first IWAD available in the list instead of closing it.
This commit is contained in:
parent
2501dc6df6
commit
f51fcd90b3
1 changed files with 1 additions and 2 deletions
|
@ -684,8 +684,7 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
|||
printf ("%d. %s (%s)\n", i+1, wads[i].Name.GetChars(), filepart);
|
||||
}
|
||||
printf ("Which one? ");
|
||||
scanf ("%d", &i);
|
||||
if (i > numwads)
|
||||
if (scanf ("%d", &i) != 1 || i > numwads)
|
||||
return -1;
|
||||
return i-1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue