forked from mirror/OpenTTD
(svn r26239) -Fix: Check that there is space left in the string parameter array, before pushing NewGRF parameters to it.
This commit is contained in:
@@ -809,7 +809,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
if (SCC_NEWGRF_FIRST <= b && b <= SCC_NEWGRF_LAST) {
|
||||
/* We need to pass some stuff as it might be modified; oh boy. */
|
||||
//todo: should argve be passed here too?
|
||||
b = RemapNewGRFStringControlCode(b, buf_start, &buff, &str, (int64 *)args->GetDataPointer(), dry_run);
|
||||
b = RemapNewGRFStringControlCode(b, buf_start, &buff, &str, (int64 *)args->GetDataPointer(), args->GetDataLeft(), dry_run);
|
||||
if (b == 0) continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user