mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01: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 count = 0;	 | ||||
|     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