summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
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 b86c5541e..2a927504b 100644
--- a/src/saveload/ai_sl.cpp
+++ b/src/saveload/ai_sl.cpp
@@ -41,7 +41,7 @@ static void SaveReal_AIPL(int *index_ptr)
AIConfig *config = AIConfig::GetConfig(index);
if (config->HasScript()) {
- ttd_strlcpy(_ai_saveload_name, config->GetName(), lengthof(_ai_saveload_name));
+ strecpy(_ai_saveload_name, config->GetName(), lastof(_ai_saveload_name));
_ai_saveload_version = config->GetVersion();
} else {
/* No AI is configured for this so store an empty string as name. */
diff --git a/src/saveload/game_sl.cpp b/src/saveload/game_sl.cpp
index 629bc271a..d9fc4ce2f 100644
--- a/src/saveload/game_sl.cpp
+++ b/src/saveload/game_sl.cpp
@@ -40,7 +40,7 @@ static void SaveReal_GSDT(int *index_ptr)
GameConfig *config = GameConfig::GetConfig();
if (config->HasScript()) {
- ttd_strlcpy(_game_saveload_name, config->GetName(), lengthof(_game_saveload_name));
+ strecpy(_game_saveload_name, config->GetName(), lastof(_game_saveload_name));
_game_saveload_version = config->GetVersion();
} else {
/* No GameScript is configured for this so store an empty string as name. */