(svn r26423) -Fix: Don't crash when supplying an invalid filename without extension to cmd parameter -q

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
planetmaker 10 years ago
parent 5370613924
commit cbb971f791

@ -400,6 +400,10 @@ FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file,
* .SS1 Transport Tycoon Deluxe preset game
* .SV1 Transport Tycoon Deluxe (Patch) saved game
* .SV2 Transport Tycoon Deluxe (Patch) saved 2-player game */
/* Don't crash if we supply no extension */
if (ext == NULL) return FIOS_TYPE_INVALID;
if (strcasecmp(ext, ".sav") == 0) {
GetFileTitle(file, title, last, SAVE_DIR);
return FIOS_TYPE_FILE;

Loading…
Cancel
Save