Fixed return value of JsonObject::set() (issue #350)

This commit is contained in:
Benoit Blanchon
2016-09-16 10:10:31 +02:00
parent a60b35f41c
commit 2f6f3d0629
3 changed files with 25 additions and 4 deletions

View File

@ -15,14 +15,16 @@ namespace ArduinoJson {
template <>
inline bool JsonObject::setNodeValue(node_type *node, String &value) {
node->content.value = _buffer->strdup(value);
return node->content.value;
const char *dup = _buffer->strdup(value);
node->content.value = dup;
return dup;
}
template <>
inline bool JsonObject::setNodeValue(node_type *node, const String &value) {
node->content.value = _buffer->strdup(value);
return node->content.value;
const char *dup = _buffer->strdup(value);
node->content.value = dup;
return dup;
}
template <>