Fixed bug in JsonObjectBase::getBoolFromToken()

This commit is contained in:
Benoit Blanchon
2014-07-14 14:50:43 +02:00
parent cf1324c09b
commit 39c185ae67

View File

@ -26,7 +26,7 @@ int JsonObjectBase::getNestedTokenCount(jsmntok_t* token)
bool JsonObjectBase::getBoolFromToken(jsmntok_t* token) bool JsonObjectBase::getBoolFromToken(jsmntok_t* token)
{ {
if (token->type != JSMN_PRIMITIVE) return 0; if (token == 0 || token->type != JSMN_PRIMITIVE) return 0;
// "true" // "true"
if (json[token->start] == 't') return true; if (json[token->start] == 't') return true;