diff options
-rw-r--r-- | src/settings.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index f61976028..4decfecf3 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -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); |