diff options
author | rubidium <rubidium@openttd.org> | 2007-06-12 15:46:34 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-12 15:46:34 +0000 |
commit | 60d738f23ae2ad657e84b9d5d995822072012e03 (patch) | |
tree | 807df3145b0384aac9a4c04c5103b8164bf210cd /src/misc_gui.cpp | |
parent | 443db4bb2e446268d1b2caad05026ffebb4a49a5 (diff) | |
download | openttd-60d738f23ae2ad657e84b9d5d995822072012e03.tar.xz |
(svn r10116) -Fix [FS#850]: remove invalid characters (for the file system) from savegame names. Based on a patch by TheJosh.
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 92c7ac9ce..276542cf9 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -35,6 +35,7 @@ #include "date.h" #include "cargotype.h" #include "player_face.h" +#include "fileio.h" #include "fios.h" /* Variables to display file lists */ @@ -1396,6 +1397,7 @@ static void GenerateFileName() SetDParam(1, p->name_2); SetDParam(2, _date); GetString(_edit_str_buf, STR_4004, lastof(_edit_str_buf)); + SanitizeFilename(_edit_str_buf); } extern void StartupEngines(); |