diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-07-10 01:41:57 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-07-10 01:41:57 -0700 |
commit | 2eed172a061a5df56bcc7cfda28b975165db38d3 (patch) | |
tree | ea4f652c7134d5ef746ad03ea929ba2951f967c8 /lib.c | |
parent | 42f2b87f012ca4980f326b0270b7a0c1fb34f5a0 (diff) | |
download | txr-2eed172a061a5df56bcc7cfda28b975165db38d3.tar.gz txr-2eed172a061a5df56bcc7cfda28b975165db38d3.tar.bz2 txr-2eed172a061a5df56bcc7cfda28b975165db38d3.zip |
split: fix for far negative indices.
* lib.c (split_func): In empty index case, convert
sequence via sub(seq, zero, t), so that ranges are
properly expanded. This was done in partition_func
in the previous commit.
* tests/012/seq.tl: Test cases added.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4270,7 +4270,7 @@ static val split_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; |