From 1a030da55d5b16d18261f029cddb543e3ef32424 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 11 Feb 2009 19:14:23 -0400 Subject: Rewrote the "entry" command. It's ALIVE! --- src/item.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/item.cc') 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 ""; + assert(len > 0); assert(len < 2048); -- cgit v1.2.3