diff --git a/src/industry.h b/src/industry.h --- a/src/industry.h +++ b/src/industry.h @@ -184,10 +184,10 @@ struct Industry : IndustryPool::PoolItem memset(&counts, 0, sizeof(counts)); } - inline const char *GetCachedName() const + inline const std::string &GetCachedName() const { if (this->cached_name.empty()) this->FillCachedName(); - return this->cached_name.c_str(); + return this->cached_name; } private: