ptr_op_t::copy(), in the TERMINALS case, wasn't copying enough.

This commit is contained in:
John Wiegley 2009-01-23 01:09:14 -04:00
parent cf861b35c0
commit 8156e34136

View file

@ -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: