summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index debda8965..ed3dbe6cc 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -50,7 +50,7 @@ void ShowNewGRFError()
SetDParamStr(3, c->filename);
SetDParam (4, STR_JUST_RAW_STRING);
SetDParamStr(5, c->error->data);
- for (uint i = 0; i < c->error->num_params; i++) {
+ for (uint i = 0; i < lengthof(c->error->param_value); i++) {
SetDParam(6 + i, c->error->param_value[i]);
}
ShowErrorMessage(STR_NEWGRF_ERROR_FATAL_POPUP, INVALID_STRING_ID, WL_CRITICAL);
@@ -67,7 +67,7 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint right, uint
SetDParamStr(2, c->filename);
SetDParam (3, STR_JUST_RAW_STRING);
SetDParamStr(4, c->error->data);
- for (uint i = 0; i < c->error->num_params; i++) {
+ for (uint i = 0; i < lengthof(c->error->param_value); i++) {
SetDParam(5 + i, c->error->param_value[i]);
}
GetString(message, c->error->custom_message == NULL ? c->error->message : STR_JUST_RAW_STRING, lastof(message));