summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-04-23 21:23:21 +0000
committerrubidium <rubidium@openttd.org>2014-04-23 21:23:21 +0000
commit21f991e2353d99064555acf7996b51c46bbd44a5 (patch)
tree98bcaf86aac6edddf70877a13a71b8337049254d /src/script
parent160ad31028c6d089ee9bc69581c9a25da00912aa (diff)
downloadopenttd-21f991e2353d99064555acf7996b51c46bbd44a5.tar.xz
(svn r26489) -Codechange: properly account for the end of buffers in the file io code instead of assuming MAX_PATH is okay
Diffstat (limited to 'src/script')
-rw-r--r--src/script/script_instance.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/script_instance.cpp b/src/script/script_instance.cpp
index eab85d74b..9cfe05c49 100644
--- a/src/script/script_instance.cpp
+++ b/src/script/script_instance.cpp
@@ -116,7 +116,7 @@ bool ScriptInstance::LoadCompatibilityScripts(const char *api_version, Subdirect
char buf[MAX_PATH];
Searchpath sp;
FOR_ALL_SEARCHPATHS(sp) {
- FioAppendDirectory(buf, MAX_PATH, sp, dir);
+ FioAppendDirectory(buf, lastof(buf), sp, dir);
strecat(buf, script_name, lastof(buf));
if (!FileExists(buf)) continue;