diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-11 19:14:23 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-11 19:14:23 -0400 |
commit | 1a030da55d5b16d18261f029cddb543e3ef32424 (patch) | |
tree | cfd273fcbaa059fa56311ae22599a205a2b1d4fd /src/item.cc | |
parent | 4eb46bedf0e6e31797826d05992e007f21ee830b (diff) | |
download | fork-ledger-1a030da55d5b16d18261f029cddb543e3ef32424.tar.gz fork-ledger-1a030da55d5b16d18261f029cddb543e3ef32424.tar.bz2 fork-ledger-1a030da55d5b16d18261f029cddb543e3ef32424.zip |
Rewrote the "entry" command. It's ALIVE!
Diffstat (limited to 'src/item.cc')
-rw-r--r-- | src/item.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/item.cc b/src/item.cc index 22e24738..48694727 100644 --- a/src/item.cc +++ b/src/item.cc @@ -329,6 +329,9 @@ bool item_t::valid() const string item_context(const item_t& item, const string& desc) { std::size_t len = item.end_pos - item.beg_pos; + if (! len) + return "<no item context>"; + assert(len > 0); assert(len < 2048); |