diff options
author | rubidium <rubidium@openttd.org> | 2014-04-23 21:12:09 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-04-23 21:12:09 +0000 |
commit | 5b82822c12e014771dceaf9d909e1c0f3653c5a9 (patch) | |
tree | 1cf02e076eb61eb94d9064c7cb02bbe85ecb9a6c /src/ai | |
parent | ef4c2ce0317ae583e837722b6a41ea44cd83da71 (diff) | |
download | openttd-5b82822c12e014771dceaf9d909e1c0f3653c5a9.tar.xz |
(svn r26486) -Codechange: replace a number of snprintfs with seprintf
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/ai_scanner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp index 262b833d7..ad66f03c6 100644 --- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -120,7 +120,7 @@ AIInfo *AIScannerInfo::FindInfo(const char *nameParam, int versionParam, bool fo if (force_exact_match) { /* Try to find a direct 'name.version' match */ char ai_name_tmp[1024]; - snprintf(ai_name_tmp, sizeof(ai_name_tmp), "%s.%d", ai_name, versionParam); + seprintf(ai_name_tmp, lastof(ai_name_tmp), "%s.%d", ai_name, versionParam); strtolower(ai_name_tmp); if (this->info_list.find(ai_name_tmp) != this->info_list.end()) return static_cast<AIInfo *>(this->info_list[ai_name_tmp]); } @@ -160,7 +160,7 @@ AILibrary *AIScannerLibrary::FindLibrary(const char *library, int version) { /* Internally we store libraries as 'library.version' */ char library_name[1024]; - snprintf(library_name, sizeof(library_name), "%s.%d", library, version); + seprintf(library_name, lastof(library_name), "%s.%d", library, version); strtolower(library_name); /* Check if the library + version exists */ |