diff options
author | frosch <frosch@openttd.org> | 2014-04-23 20:44:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2014-04-23 20:44:42 +0000 |
commit | ef4c2ce0317ae583e837722b6a41ea44cd83da71 (patch) | |
tree | c0c3d77ac495a6b9257cd7de4dadc6712db1acc8 /src/script | |
parent | 56e8ea6ddef08eb6ad1a28d06dddecb902e1bc04 (diff) | |
download | openttd-ef4c2ce0317ae583e837722b6a41ea44cd83da71.tar.xz |
(svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat.
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/api/script_controller.cpp | 2 | ||||
-rw-r--r-- | src/script/script_instance.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/script_controller.cpp b/src/script/api/script_controller.cpp index d8489da49..7f8df248d 100644 --- a/src/script/api/script_controller.cpp +++ b/src/script/api/script_controller.cpp @@ -133,7 +133,7 @@ ScriptController::~ScriptController() LoadedLibraryList::iterator iter = controller->loaded_library.find(library_name); if (iter != controller->loaded_library.end()) { - ttd_strlcpy(fake_class, (*iter).second, sizeof(fake_class)); + strecpy(fake_class, (*iter).second, lastof(fake_class)); } else { int next_number = ++controller->loaded_library_count; diff --git a/src/script/script_instance.cpp b/src/script/script_instance.cpp index 1aa5f1978..eab85d74b 100644 --- a/src/script/script_instance.cpp +++ b/src/script/script_instance.cpp @@ -117,7 +117,7 @@ bool ScriptInstance::LoadCompatibilityScripts(const char *api_version, Subdirect Searchpath sp; FOR_ALL_SEARCHPATHS(sp) { FioAppendDirectory(buf, MAX_PATH, sp, dir); - ttd_strlcat(buf, script_name, MAX_PATH); + strecat(buf, script_name, lastof(buf)); if (!FileExists(buf)) continue; if (this->engine->LoadScript(buf)) return true; |