summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-07-10 02:53:57 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-07-10 02:53:57 -0700
commit36a83b0c6ba341377a3fe0595993599d172e70a8 (patch)
treefcb0c75ce183c68382829348f19646c6626b8263 /struct.c
parentfbacd030e6e93b3cbd60763154f96a28360a7a46 (diff)
downloadtxr-36a83b0c6ba341377a3fe0595993599d172e70a8.tar.gz
txr-36a83b0c6ba341377a3fe0595993599d172e70a8.tar.bz2
txr-36a83b0c6ba341377a3fe0595993599d172e70a8.zip
split, split*: fix poor behavior for beyond-length indices.
* lib.c (split_func, split_Star_func): Ignore indices greater than the length of the sequence, the same as negative indices are ignored which don't become nonnegative after adding the length. * tests/012/seq.tl: Fix questionable test cases, which now confirm the right behavior.
Diffstat (limited to 'struct.c')
0 files changed, 0 insertions, 0 deletions