1
0
Fork 0

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

release/1.5
planetmaker 2014-03-23 14:55:32 +00:00
parent 5370613924
commit cbb971f791
1 changed files with 4 additions and 0 deletions

View File

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