option_t's copy constructor wasn't copying "wants_arg".
This was causing "reg -p this" to fail in the REPL.
This commit is contained in:
parent
9039cf4986
commit
bedadd03a0
1 changed files with 5 additions and 1 deletions
|
|
@ -58,6 +58,8 @@ class option_t
|
||||||
const char ch;
|
const char ch;
|
||||||
bool handled;
|
bool handled;
|
||||||
|
|
||||||
|
option_t& operator=(const option_t&);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
T * parent;
|
T * parent;
|
||||||
value_t value;
|
value_t value;
|
||||||
|
|
@ -75,7 +77,8 @@ public:
|
||||||
ch(other.ch),
|
ch(other.ch),
|
||||||
handled(other.handled),
|
handled(other.handled),
|
||||||
parent(NULL),
|
parent(NULL),
|
||||||
value(other.value)
|
value(other.value),
|
||||||
|
wants_arg(other.wants_arg)
|
||||||
{
|
{
|
||||||
TRACE_CTOR(option_t, "copy");
|
TRACE_CTOR(option_t, "copy");
|
||||||
}
|
}
|
||||||
|
|
@ -103,6 +106,7 @@ public:
|
||||||
|
|
||||||
string& str() {
|
string& str() {
|
||||||
assert(handled);
|
assert(handled);
|
||||||
|
assert(value);
|
||||||
return value.as_string_lval();
|
return value.as_string_lval();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue