mirror of https://github.com/OpenTTD/OpenTTD.git
parent
57b992717b
commit
d62c5667cf
|
@ -357,6 +357,10 @@ void OneOfManySettingDesc::FormatValue(char *buf, const char *last, const void *
|
|||
void ManyOfManySettingDesc::FormatValue(char *buf, const char *last, const void *object) const
|
||||
{
|
||||
uint bitmask = (uint)this->Read(object);
|
||||
if (bitmask == 0) {
|
||||
buf[0] = '\0';
|
||||
return;
|
||||
}
|
||||
bool first = true;
|
||||
for (uint id : SetBitIterator(bitmask)) {
|
||||
if (!first) buf = strecpy(buf, "|", last);
|
||||
|
|
Loading…
Reference in New Issue