summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-07-10 02:29:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-07-10 02:29:34 -0700
commit9ab4fa1b2b6912380fef4a41020b2a369a29473e (patch)
treebf692c1efe216c8168696ff8ff83d3a5228cca6d /lib.c
parent7c69a3babde0b80df81fe0311b84113be3cac0ce (diff)
downloadtxr-9ab4fa1b2b6912380fef4a41020b2a369a29473e.tar.gz
txr-9ab4fa1b2b6912380fef4a41020b2a369a29473e.tar.bz2
txr-9ab4fa1b2b6912380fef4a41020b2a369a29473e.zip
split**: split for far negative indices.
* lib.c (split_star_func): In empty index case, convert sequence via sub(seq, zero, t), so that ranges are properly expanded. This was done in split_func and partition_func in recent commits. * tests/012/seq.tl: Test cases added.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 675a5f47..4e21108b 100644
--- a/lib.c
+++ b/lib.c
@@ -4312,7 +4312,7 @@ static val split_star_func(val base, val lcons)
us_rplaca(lcons, first);
}
} else {
- us_rplaca(lcons, seq);
+ us_rplaca(lcons, sub(seq, zero, t));
us_rplacd(lcons, nil);
}
break;