(svn r26489) -Codechange: properly account for the end of buffers in the file io code instead of assuming MAX_PATH is okay
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user