summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-23 01:09:14 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-23 01:09:14 -0400
commit8156e341361a03958a217d1a457eff47212661ee (patch)
treedfe1aeb83ce5ae0183f65ce774fb13f90cce0490
parentcf861b35c09aad09bc18340e6c8affb7349f4efc (diff)
downloadfork-ledger-8156e341361a03958a217d1a457eff47212661ee.tar.gz
fork-ledger-8156e341361a03958a217d1a457eff47212661ee.tar.bz2
fork-ledger-8156e341361a03958a217d1a457eff47212661ee.zip
ptr_op_t::copy(), in the TERMINALS case, wasn't copying enough.
-rw-r--r--src/op.h5
1 files changed, 4 insertions, 1 deletions
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: