diff --git a/NEWS.txt b/NEWS.txt index 8316ff6..39ed9ab 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -31,6 +31,11 @@ New in SVN representable using an Int64, or asDouble() combined with minInt64 and maxInt64 to figure out whether it is approximately representable. +* Bug fixes + - Patch #3539678: Copy constructor does not initialize allocated_ for stringValue + (contributed by rmongia). + + New in JsonCpp 0.6.0: --------------------- diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index 91f312e..4f2e216 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -470,7 +470,10 @@ Value::Value( const Value &other ) allocated_ = true; } else + { value_.string_ = 0; + allocated_ = false; + } break; #ifndef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: