Fix: GRF Parameters not displayed due to scope issue. (#10911)

Move params so it is still in scope when the text is actually drawn.

(cherry picked from commit a5a3a07005)
pull/569/head
PeterN 1 year ago committed by Jonathan G Rennison
parent c6a6e7c60b
commit 277e80abb5

@ -113,8 +113,9 @@ static void ShowNewGRFInfo(const GRFConfig *c, const Rect &r, bool show_params)
/* Show GRF parameter list */
if (show_params) {
std::string params;
if (c->num_params > 0) {
std::string params = GRFBuildParamList(c);
params = GRFBuildParamList(c);
SetDParam(0, STR_JUST_RAW_STRING);
SetDParamStr(1, params);
} else {

Loading…
Cancel
Save