mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 21:12:25 +02:00
Fixed bug JsonObjectBase::getNestedTokenCount() that reads uninitialized token
This commit is contained in:
@ -10,15 +10,15 @@ using namespace ArduinoJson::Parser;
|
||||
|
||||
int JsonObjectBase::getNestedTokenCount(jsmntok_t* token)
|
||||
{
|
||||
int end = token->end;
|
||||
int tokensToVisit = token->size;
|
||||
int count = 0;
|
||||
|
||||
token++;
|
||||
|
||||
while (token->start < end)
|
||||
while (tokensToVisit)
|
||||
{
|
||||
token++;
|
||||
count++;
|
||||
token++;
|
||||
tokensToVisit--;
|
||||
tokensToVisit += token->size;
|
||||
}
|
||||
|
||||
return count;
|
||||
|
Reference in New Issue
Block a user