1
0
Fork 0

Initialise all fields when constructing, fixes unintentional value reuse with Prop_multival.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3890
This commit is contained in:
Peter Veenstra 2015-01-09 15:00:18 +00:00
parent 85667fbe0f
commit b81c813b87

View file

@ -86,7 +86,7 @@ public:
Value(char const * const in) :_string(new std::string(in)),type(V_STRING) { };
Value(Value const& in):_string(0) {plaincopy(in);}
~Value() { destroy();};
Value(std::string const& in,Etype _t) :_string(0),type(V_NONE) {SetValue(in,_t);}
Value(std::string const& in,Etype _t) :_hex(0),_bool(false),_int(0),_string(0),_double(0),type(V_NONE) {SetValue(in,_t);}
/* Assigment operators */
Value& operator= (Hex in) throw(WrongType) { return copy(Value(in));}