From 8db08da14886dc2e548edb988640d491591f0d89 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sun, 11 Feb 2024 00:43:13 +0000 Subject: [PATCH] Fix #12052: NewGRFs clearing industry cargo slots could fallback to default instead of empty. (#12053) Ensure the default label is cleared when NewGRF sets a produced/accepted cargo slot, so that default fallback isn't used. --- src/newgrf.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index ffc16c067a..676f63d6d1 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -3790,6 +3790,7 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop, } else { indsp->produced_cargo[i] = INVALID_CARGO; } + indsp->produced_cargo_label[i] = CT_INVALID; } break; } @@ -3808,6 +3809,7 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop, } else { indsp->accepts_cargo[i] = INVALID_CARGO; } + indsp->accepts_cargo_label[i] = CT_INVALID; } break; }