From 477c15383d00caaf62bc554d6ff8890adebce071 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 12 Jan 2014 18:00:02 +0000 Subject: (svn r26239) -Fix: Check that there is space left in the string parameter array, before pushing NewGRF parameters to it. --- src/strings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/strings.cpp') diff --git a/src/strings.cpp b/src/strings.cpp index 97398194a..37f57954f 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -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; } -- cgit v1.2.3-54-g00ecf