summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--buf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/buf.c b/buf.c
index d5782dc2..41de5b28 100644
--- a/buf.c
+++ b/buf.c
@@ -433,7 +433,7 @@ val sub_buf(val buf, val from, val to)
if (ge(from, to)) {
return make_buf(zero, nil, zero);
- } else if (from == 0 && to == len) {
+ } else if (from == zero && to == len) {
return buf;
} else {
return make_duplicate_buf(minus(to, from), b->data + c_num(from, self));