ptr_op_t::copy(), in the TERMINALS case, wasn't copying enough.
This commit is contained in:
parent
cf861b35c0
commit
8156e34136
1 changed files with 4 additions and 1 deletions
5
src/op.h
5
src/op.h
|
|
@ -273,7 +273,10 @@ private:
|
|||
ptr_op_t _right = NULL);
|
||||
|
||||
ptr_op_t copy(ptr_op_t _left = NULL, ptr_op_t _right = NULL) const {
|
||||
return new_node(kind, _left, _right);
|
||||
ptr_op_t node(new_node(kind, _left, _right));
|
||||
if (kind < TERMINALS)
|
||||
node->data = data;
|
||||
return node;
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue