Fix #9766: Don't write uninitialised data in config file

(cherry picked from commit 50304f7164d5c88a42dcc1d09648c3ec8b2faab5)

Fixes: #344
pull/348/head
glx22 3 years ago committed by Jonathan G Rennison
parent dda4167edc
commit 3069f805e2

@ -386,6 +386,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…
Cancel
Save