diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-23 01:09:14 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-23 01:09:14 -0400 |
commit | 8156e341361a03958a217d1a457eff47212661ee (patch) | |
tree | dfe1aeb83ce5ae0183f65ce774fb13f90cce0490 | |
parent | cf861b35c09aad09bc18340e6c8affb7349f4efc (diff) | |
download | fork-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.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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: |