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 | 73790d9cd6de5b704f006b20b7fd5e150368fd55 (patch) | |
tree | 807df3145b0384aac9a4c04c5103b8164bf210cd /src/screenshot.cpp | |
parent | 4df44a4dffbe6d537bbea91ce99cc30ba131606a (diff) | |
download | openttd-73790d9cd6de5b704f006b20b7fd5e150368fd55.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/screenshot.cpp')
-rw-r--r-- | src/screenshot.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 5948f29d3..738f28a68 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -14,6 +14,7 @@ #include "variables.h" #include "date.h" #include "helpers.hpp" +#include "fileio.h" char _screenshot_format_name[8]; uint _num_screenshot_formats; @@ -505,6 +506,7 @@ static char *MakeScreenshotName(const char *ext) GetString(_screenshot_name, STR_4004, lastof(_screenshot_name)); } + SanitizeFilename(_screenshot_name); base = strchr(_screenshot_name, 0); base[0] = '.'; strcpy(base + 1, ext); |