diff options
author | rubidium <rubidium@openttd.org> | 2014-04-23 21:23:21 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-04-23 21:23:21 +0000 |
commit | 21f991e2353d99064555acf7996b51c46bbd44a5 (patch) | |
tree | 98bcaf86aac6edddf70877a13a71b8337049254d /src/script | |
parent | 160ad31028c6d089ee9bc69581c9a25da00912aa (diff) | |
download | openttd-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.cpp | 2 |
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; |