diff options
author | frosch <frosch@openttd.org> | 2014-01-12 18:00:02 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2014-01-12 18:00:02 +0000 |
commit | 477c15383d00caaf62bc554d6ff8890adebce071 (patch) | |
tree | 07ed9c1c633a4250b0d59991fb9a6e354f87d109 /src/strings.cpp | |
parent | 5ab39cc65176bc150625995a6a639625a7b1f579 (diff) | |
download | openttd-477c15383d00caaf62bc554d6ff8890adebce071.tar.xz |
(svn r26239) -Fix: Check that there is space left in the string parameter array, before pushing NewGRF parameters to it.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r-- | src/strings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |