summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);