summaryrefslogtreecommitdiff
path: root/src/fios.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-07-28 15:31:11 +0000
committersmatz <smatz@openttd.org>2008-07-28 15:31:11 +0000
commit88637d92132eb75ba3f80a1f6ed2da11c623e747 (patch)
tree92adee9802fa2afd2948d6271d9d99a5c9b885dd /src/fios.cpp
parent686019398f20ee51ea9a9ff31cafde3977d443b5 (diff)
downloadopenttd-88637d92132eb75ba3f80a1f6ed2da11c623e747.tar.xz
(svn r13859) -Fix: loading of TTD(Patch) savegames from the command line didn't work
Diffstat (limited to 'src/fios.cpp')
-rw-r--r--src/fios.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fios.cpp b/src/fios.cpp
index 73c3b9ae2..cdecb1b34 100644
--- a/src/fios.cpp
+++ b/src/fios.cpp
@@ -297,12 +297,12 @@ static FiosItem *FiosGetFileList(SaveLoadDialogMode mode, fios_getlist_callback_
* @param mode Save/load mode.
* @param file Name of the file to check.
* @param ext A pointer to the extension identifier inside file
- * @param title Buffer if a callback wants to lookup the title of the file
+ * @param title Buffer if a callback wants to lookup the title of the file; NULL to skip the lookup
* @return a FIOS_TYPE_* type of the found file, FIOS_TYPE_INVALID if not a savegame
* @see FiosGetFileList
* @see FiosGetSavegameList
*/
-static FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file, const char *ext, char *title)
+FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char *file, const char *ext, char *title)
{
/* Show savegame files
* .SAV OpenTTD saved game
@@ -314,7 +314,7 @@ static FiosType FiosGetSavegameListCallback(SaveLoadDialogMode mode, const char
if (mode == SLD_LOAD_GAME || mode == SLD_LOAD_SCENARIO) {
if (strcasecmp(ext, ".ss1") == 0 || strcasecmp(ext, ".sv1") == 0 ||
strcasecmp(ext, ".sv2") == 0) {
- GetOldSaveGameName(title, _fios_path, file);
+ if (title != NULL) GetOldSaveGameName(title, _fios_path, file);
return FIOS_TYPE_OLDFILE;
}
}