(svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat.

This commit is contained in:
frosch
2014-04-23 20:44:42 +00:00
parent 547e8233be
commit 24c7134bff
19 changed files with 58 additions and 108 deletions

View File

@@ -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. */

View File

@@ -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. */