(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:
frosch
2014-01-12 18:00:02 +00:00
parent 5ab39cc651
commit 477c15383d
3 changed files with 36 additions and 3 deletions

View File

@@ -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;
}