Merge pull request #19 from edward-san/unix_no_gtk_iwadpicker_fix

- Fixed scanf in IWAD picker without GTK
This commit is contained in:
rheit 2014-02-24 15:18:24 -06:00
commit 3111f8f93d

View file

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