1
0
Fork 0

Fix: Don't let CT_INVALID map to valid cargo type.

pull/12364/head
Peter Nelson 2024-03-23 18:54:21 +00:00
parent 0f25eaa271
commit a11b2d5d7f
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ void BuildCargoLabelMap()
CargoSpec::label_map.clear();
for (const CargoSpec &cs : CargoSpec::array) {
/* During initialization, CargoSpec can be marked valid before the label has been set. */
if (!cs.IsValid() || cs.label == CargoLabel{0}) continue;
if (!cs.IsValid() || cs.label == CargoLabel{0} || cs.label == CT_INVALID) continue;
/* Label already exists, don't addd again. */
if (CargoSpec::label_map.count(cs.label) != 0) continue;