diff --git a/JSON/src/Object.cpp b/JSON/src/Object.cpp index 941e31015..f55be8149 100644 --- a/JSON/src/Object.cpp +++ b/JSON/src/Object.cpp @@ -117,7 +117,7 @@ const std::string& Object::getKey(KeyPtrList::const_iterator& iter) const void Object::set(const std::string& key, const Dynamic::Var& value) { std::pair ret = _values.insert(ValueMap::value_type(key, value)); - if (!ret.second) _values[key] = value; + if (!ret.second) ret.first->second = value; if (_preserveInsOrder) { KeyPtrList::iterator it = _keys.begin();