1
0
Fork 0

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

Move params so it is still in scope when the text is actually drawn.
pull/10913/head
PeterN 2023-06-03 12:07:59 +01:00 committed by GitHub
parent 513ede7669
commit a5a3a07005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -110,8 +110,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 {