From 8156e341361a03958a217d1a457eff47212661ee Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 23 Jan 2009 01:09:14 -0400 Subject: ptr_op_t::copy(), in the TERMINALS case, wasn't copying enough. --- src/op.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/op.h') diff --git a/src/op.h b/src/op.h index 7f07da94..d8f572d6 100644 --- a/src/op.h +++ b/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: -- cgit v1.2.3