forked from mirror/OpenTTD
(svn r6884) -Codechange: Add strict bounds checking in string formatting system.
The last parameter should point to the end of the buffer (eg lastof(buf)) Courtesy of Tron.
This commit is contained in:
@@ -504,7 +504,7 @@ static char *MakeScreenshotName(const char *ext)
|
||||
SetDParam(0, p->name_1);
|
||||
SetDParam(1, p->name_2);
|
||||
SetDParam(2, _date);
|
||||
GetString(_screenshot_name, STR_4004);
|
||||
GetString(_screenshot_name, STR_4004, lastof(_screenshot_name));
|
||||
}
|
||||
|
||||
base = strchr(_screenshot_name, 0);
|
||||
|
Reference in New Issue
Block a user