summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-04-24 04:41:54 +0000
committerrubidium <rubidium@openttd.org>2014-04-24 04:41:54 +0000
commitb4914b91d9dc5fb007fd0705ef1678fe9f71848c (patch)
treef22cd9ac404f5c0e00eed492004cb5a41753328d /src/saveload
parentae46990636684052932d659cb23cd46bf016d824 (diff)
downloadopenttd-b4914b91d9dc5fb007fd0705ef1678fe9f71848c.tar.xz
(svn r26493) -Codechange: use strecat to concatenate script settings instead of manually accounting for the amount of characters that has been written
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/ai_sl.cpp2
-rw-r--r--src/saveload/game_sl.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/saveload/ai_sl.cpp b/src/saveload/ai_sl.cpp
index 2a927504b..e8b5339c0 100644
--- a/src/saveload/ai_sl.cpp
+++ b/src/saveload/ai_sl.cpp
@@ -51,7 +51,7 @@ static void SaveReal_AIPL(int *index_ptr)
_ai_saveload_is_random = config->IsRandom();
_ai_saveload_settings[0] = '\0';
- config->SettingsToString(_ai_saveload_settings, lengthof(_ai_saveload_settings));
+ config->SettingsToString(_ai_saveload_settings, lastof(_ai_saveload_settings));
SlObject(NULL, _ai_company);
/* If the AI was active, store his data too */
diff --git a/src/saveload/game_sl.cpp b/src/saveload/game_sl.cpp
index d9fc4ce2f..141353d81 100644
--- a/src/saveload/game_sl.cpp
+++ b/src/saveload/game_sl.cpp
@@ -50,7 +50,7 @@ static void SaveReal_GSDT(int *index_ptr)
_game_saveload_is_random = config->IsRandom();
_game_saveload_settings[0] = '\0';
- config->SettingsToString(_game_saveload_settings, lengthof(_game_saveload_settings));
+ config->SettingsToString(_game_saveload_settings, lastof(_game_saveload_settings));
SlObject(NULL, _game_script);
Game::Save();