summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-06 06:23:44 +0000
committerrubidium <rubidium@openttd.org>2007-08-06 06:23:44 +0000
commit51f773bd16451efb9e3c00cf72b20b493bcc8cc6 (patch)
tree6c6502c3537f338fe22719a1160c7778f4ee9fd1
parent83e1fdcb0167c36729889511f7b1165038044c88 (diff)
downloadopenttd-51f773bd16451efb9e3c00cf72b20b493bcc8cc6.tar.xz
(svn r10807) -Fix [FS#1108]: keep_all_autosaves always got ".sav" as filename, which basically means that it only kept the last autosave.
-rw-r--r--src/openttd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index ae415748b..ddd8ac99c 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1023,7 +1023,7 @@ static void DoAutosave()
SetDParam(0, _local_player);
SetDParam(1, _date);
GetString(buf, STR_4004, lastof(buf));
- ttd_strlcpy(buf, ".sav", sizeof(buf));
+ ttd_strlcat(buf, ".sav", lengthof(buf));
} else {
/* generate a savegame name and number according to _patches.max_num_autosaves */
snprintf(buf, sizeof(buf), "autosave%d.sav", _autosave_ctr);