From b81c813b8744cfec79befe7a14420e78bb3e5f88 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Fri, 9 Jan 2015 15:00:18 +0000 Subject: [PATCH] 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 --- include/setup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/setup.h b/include/setup.h index b17d9e01..7c8ad3dc 100644 --- a/include/setup.h +++ b/include/setup.h @@ -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));}