mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Fixed exception when using Flash strings as object keys (fixes #784)
This commit is contained in:
		| @@ -1,6 +1,11 @@ | ||||
| ArduinoJson: change log | ||||
| ======================= | ||||
|  | ||||
| HEAD | ||||
| ---- | ||||
|  | ||||
| * Fixed exception when using Flash strings as object keys (issue #784) | ||||
|  | ||||
| v6.2.2-beta | ||||
| ----------- | ||||
|  | ||||
|   | ||||
| @@ -15,7 +15,7 @@ class FixedSizeFlashString { | ||||
|   bool equals(const char* expected) const { | ||||
|     const char* actual = reinterpret_cast<const char*>(_str); | ||||
|     if (!actual || !expected) return actual == expected; | ||||
|     return strcmp_P(actual, expected) == 0; | ||||
|     return strncmp_P(expected, actual, _size) == 0; | ||||
|   } | ||||
|  | ||||
|   bool is_null() const { | ||||
|   | ||||
| @@ -14,7 +14,7 @@ class ZeroTerminatedFlashString { | ||||
|   bool equals(const char* expected) const { | ||||
|     const char* actual = reinterpret_cast<const char*>(_str); | ||||
|     if (!actual || !expected) return actual == expected; | ||||
|     return strcmp_P(actual, expected) == 0; | ||||
|     return strcmp_P(expected, actual) == 0; | ||||
|   } | ||||
|  | ||||
|   bool is_null() const { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user