(svn r10807) -Fix [FS#1108]: keep_all_autosaves always got ".sav" as filename, which basically means that it only kept the last autosave.
authorrubidium
Mon, 06 Aug 2007 06:23:44 +0000
changeset 7414 a5959e1de91b
parent 7413 a590f7f0edb3
child 7415 236b512fd8a1
(svn r10807) -Fix [FS#1108]: keep_all_autosaves always got ".sav" as filename, which basically means that it only kept the last autosave.
src/openttd.cpp
--- a/src/openttd.cpp	Sun Aug 05 21:20:55 2007 +0000
+++ b/src/openttd.cpp	Mon Aug 06 06:23:44 2007 +0000
@@ -1023,7 +1023,7 @@
 		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);