mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 16:14:05 +01:00
Fixed JsonVariant::isNull() not returning true after set((char*)0)
This commit is contained in:
@@ -29,6 +29,7 @@ class ConstRamStringAdapter {
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
if (!_str) return 0;
|
||||
return strlen(_str);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ class FlashStringAdapter {
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
if (!_str) return 0;
|
||||
return strlen_P(reinterpret_cast<const char*>(_str));
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class SizedFlashStringAdapter {
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
return strlen_P(reinterpret_cast<const char*>(_str));
|
||||
return _size;
|
||||
}
|
||||
|
||||
bool isStatic() const {
|
||||
|
||||
@@ -30,7 +30,7 @@ class SizedRamStringAdapter {
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
return strlen(reinterpret_cast<const char*>(_str));
|
||||
return _size;
|
||||
}
|
||||
|
||||
bool isStatic() const {
|
||||
|
||||
Reference in New Issue
Block a user