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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user