diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-05-17 23:31:59 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2020-05-21 20:02:34 +0200 |
commit | 63ccb36ef3ecd53a503c0e9fea87f0784802af0f (patch) | |
tree | d3e1134029fd437d1ad2d948f83592b930e9456f /src/townname.cpp | |
parent | 9b6f5e3bb850b6cff02cc761767fcdf49c681645 (diff) | |
download | openttd-63ccb36ef3ecd53a503c0e9fea87f0784802af0f.tar.xz |
Codechange: Use std::string for most of the user-settable custom names.
Diffstat (limited to 'src/townname.cpp')
-rw-r--r-- | src/townname.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/townname.cpp b/src/townname.cpp index 5cc414794..77dfb448b 100644 --- a/src/townname.cpp +++ b/src/townname.cpp @@ -97,7 +97,7 @@ bool VerifyTownName(uint32 r, const TownNameParams *par, TownNames *town_names) for (const Town *t : Town::Iterate()) { /* We can't just compare the numbers since * several numbers may map to a single name. */ - const char *buf = t->name; + const char *buf = t->name.empty() ? nullptr : t->name.c_str(); if (buf == nullptr) { GetTownName(buf2, t, lastof(buf2)); buf = buf2; |