summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-06-12 13:22:14 +0000
committermaedhros <maedhros@openttd.org>2007-06-12 13:22:14 +0000
commit109dd33c4a7d73ef08c2f02ca1b06475c6ba85b0 (patch)
tree5ee61ed1866ad23ad460d7ef74060ce9760f90df /src/newgrf_gui.cpp
parentd1e71eb34e20d8871ab5f41ecc63389a4cc0a6b7 (diff)
downloadopenttd-109dd33c4a7d73ef08c2f02ca1b06475c6ba85b0.tar.xz
(svn r10114) -Fix: Only load newgrf error messages if the language matches the current
language. Since only one error can be loaded anyway, if the language didn't match you'd get "Undefined string". Also since we're only loading one language there's no need to use AddGRFString any more.
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 22335c3d1..4b36dc452 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -48,7 +48,7 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint w, uint bott
if (c->error != NULL) {
SetDParamStr(0, c->filename);
- SetDParam(1, c->error->data);
+ SetDParamStr(1, c->error->data);
for (uint i = 0; i < c->error->num_params; i++) {
uint32 param = 0;
byte param_number = c->error->param_number[i];
@@ -59,7 +59,7 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint w, uint bott
}
char message[512];
- GetString(message, c->error->message, lastof(message));
+ GetString(message, c->error->custom_message != NULL ? BindCString(c->error->custom_message) : c->error->message, lastof(message));
SetDParamStr(0, message);
y += DrawStringMultiLine(x, y, c->error->severity, w, bottom - y);