mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	asBoolean() ignores pointers (6796,5626)
This commit is contained in:
		| @@ -85,7 +85,7 @@ struct Converter<bool> { | ||||
|  | ||||
|   static bool fromJson(VariantConstRef src) { | ||||
|     const VariantData* data = getData(src); | ||||
|     return data ? data->asBoolean() : false; | ||||
|     return data ? data->resolve()->asBoolean() : false; | ||||
|   } | ||||
|  | ||||
|   static bool checkJson(VariantConstRef src) { | ||||
|   | ||||
| @@ -45,8 +45,6 @@ inline bool VariantData::asBoolean() const { | ||||
|       return _content.asFloat != 0; | ||||
|     case VALUE_IS_NULL: | ||||
|       return false; | ||||
|     case VALUE_IS_POINTER:  // P+0 G+0 | ||||
|       return _content.asPointer->asBoolean(); | ||||
|     default: | ||||
|       return true; | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user