1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 12:39:11 +00:00

(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:
rubidium
2014-04-23 21:23:21 +00:00
parent 160ad31028
commit 21f991e235
10 changed files with 95 additions and 88 deletions

View File

@@ -390,7 +390,7 @@ static char *GetFullFilename(const ContentInfo *ci, bool compressed)
if (dir == NO_DIRECTORY) return NULL;
static char buf[MAX_PATH];
FioGetFullPath(buf, lengthof(buf), SP_AUTODOWNLOAD_DIR, dir, ci->filename);
FioGetFullPath(buf, lastof(buf), SP_AUTODOWNLOAD_DIR, dir, ci->filename);
strecat(buf, compressed ? ".tar.gz" : ".tar", lastof(buf));
return buf;