mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 16:14:05 +01:00
Fixed static JsonString not being saved by reference
This commit is contained in:
@@ -53,10 +53,11 @@ class StringAdapter : public RamStringAdapter {
|
||||
return _isStatic;
|
||||
}
|
||||
|
||||
/* const char* save(MemoryPool* pool) const {
|
||||
if (_isStatic) return c_str();
|
||||
return RamStringAdapter::save(pool);
|
||||
}*/
|
||||
const char* save(MemoryPool* pool) const {
|
||||
if (_isStatic)
|
||||
return data();
|
||||
return RamStringAdapter::save(pool);
|
||||
}
|
||||
|
||||
private:
|
||||
bool _isStatic;
|
||||
|
||||
Reference in New Issue
Block a user