Changeset - r26148:2289dfd603fc
[Not reviewed]
master
0 1 0
Loïc Guilloux - 2 years ago 2022-01-04 21:12:05
glx22@users.noreply.github.com
Fix #9766: Don't write uninitialised data in config file (#9767)
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/settings.cpp
Show inline comments
 
@@ -357,6 +357,10 @@ void OneOfManySettingDesc::FormatValue(c
 
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);
0 comments (0 inline, 0 general)