1
0
mirror of https://github.com/benhoyt/inih.git synced 2025-01-28 22:52:54 +08:00

Make INIReader not crash when INI_ALLOW_NO_VALUE enabled (with value NULL)

This commit is contained in:
Ben Hoyt 2019-12-13 21:41:12 -05:00
parent d0a152d531
commit 1e7a61d696

View File

@ -109,6 +109,6 @@ int INIReader::ValueHandler(void* user, const char* section, const char* name,
string key = MakeKey(section, name);
if (reader->_values[key].size() > 0)
reader->_values[key] += "\n";
reader->_values[key] += value;
reader->_values[key] += value ? value : "";
return 1;
}