1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 06:06:59 +01:00

Fix , 667d0137: Ancient NewGRF have empty name and description, show the filename instead. ()

This commit is contained in:
frosch 2025-03-31 14:25:47 +02:00 committed by GitHub
parent 0055e168f0
commit 6c569f36e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,7 +85,7 @@ void GRFConfig::CopyParams(const GRFConfig &src)
std::string GRFConfig::GetName() const
{
auto name = GetGRFStringFromGRFText(this->name);
return name.has_value() ? std::string(*name) : this->filename;
return name.has_value() && !name->empty() ? std::string(*name) : this->filename;
}
/**