summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 45e5b865..c462a238 100644
--- a/lib.c
+++ b/lib.c
@@ -7144,6 +7144,8 @@ val sub_vec(val vec_in, val from, val to)
if (ge(from, to)) {
return vector(zero, nil);
+ } else if (from == zero && eql(to, len)) {
+ return vec_in;
} else {
cnum cfrom = c_num(from);
size_t nelem = c_num(to) - cfrom;