summaryrefslogtreecommitdiff
path: root/lib/String.cc
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-11-28 19:07:20 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-11-28 19:07:20 +0100
commit52688e09827ad6d30f21a58e673a9d8499dc8b89 (patch)
treeed76cb6aaa6bf845f8ac50e935f6e679bf113a2b /lib/String.cc
parentc02c5e3c43d1a0a87b541f106f7527abea934696 (diff)
Small adjustment to the strdup call; the to includes the last character.
Diffstat (limited to 'lib/String.cc')
-rw-r--r--lib/String.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/String.cc b/lib/String.cc
index 28a3fff..7300365 100644
--- a/lib/String.cc
+++ b/lib/String.cc
@@ -279,7 +279,7 @@ char * String::strdup(size_t from, ssize_t to) const {
r = Base::strdup(to_charp(from, -1));
to -= from;
if ((to >= 0) && (to < (siz - from)))
- r[to] = 0;
+ r[to + 1] = 0;
return r;
}