From 83cef74ff89d685295e201ffe188073050814428 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 8 Oct 2008 08:24:46 -0700 Subject: Adding a consolidating case to the extract method. --- lib/String.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/String.cc b/lib/String.cc index 6fc9bfa..08818eb 100644 --- a/lib/String.cc +++ b/lib/String.cc @@ -237,6 +237,9 @@ const char * String::to_charp(size_t from, ssize_t to) const throw (GeneralExcep if (to < 0) { return str + from; } else { + if (siz == 0) { + return str; + } if (((size_t) to) >= siz) { to = siz - 1; } -- cgit v1.2.3