(svn r15144) -Codechange: make sure we don't run out of bounds while determining old savegame name

Note this can't happen in current code
This commit is contained in:
smatz
2009-01-18 22:44:53 +00:00
parent a46245f21f
commit 3bceaf41b4
4 changed files with 23 additions and 16 deletions

View File

@@ -514,7 +514,7 @@ int ttd_main(int argc, char *argv[])
/* if the file doesn't exist or it is not a valid savegame, let the saveload code show an error */
const char *t = strrchr(_file_to_saveload.name, '.');
if (t != NULL) {
FiosType ft = FiosGetSavegameListCallback(SLD_LOAD_GAME, _file_to_saveload.name, t, NULL);
FiosType ft = FiosGetSavegameListCallback(SLD_LOAD_GAME, _file_to_saveload.name, t, NULL, NULL);
if (ft != FIOS_TYPE_INVALID) SetFiosType(ft);
}