summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index b9e110639..40e074da5 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -6195,12 +6195,10 @@ static void GRFLoadError(ByteReader *buf)
}
/* Only two parameter numbers can be used in the string. */
- uint i = 0;
- for (; i < 2 && buf->HasData(); i++) {
+ for (uint i = 0; i < lengthof(error->param_value) && buf->HasData(); i++) {
uint param_number = buf->ReadByte();
error->param_value[i] = _cur.grffile->GetParam(param_number);
}
- error->num_params = i;
_cur.grfconfig->error = error;
}