mirror of
https://github.com/benhoyt/inih.git
synced 2025-01-28 22:52:54 +08:00
Make INIReader not crash when INI_CALL_HANDLER_ON_NEW_SECTION enabled (name NULL)
This commit is contained in:
parent
1e7a61d696
commit
75fe6b1a03
@ -105,6 +105,8 @@ string INIReader::MakeKey(const string& section, const string& name)
|
||||
int INIReader::ValueHandler(void* user, const char* section, const char* name,
|
||||
const char* value)
|
||||
{
|
||||
if (!name) // Happens when INI_CALL_HANDLER_ON_NEW_SECTION enabled
|
||||
return 1;
|
||||
INIReader* reader = static_cast<INIReader*>(user);
|
||||
string key = MakeKey(section, name);
|
||||
if (reader->_values[key].size() > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user