diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-01-21 01:02:48 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-01-21 01:02:48 -0800 |
commit | 15cc57607711e8e3de2d97d67d04d72a8d08968b (patch) | |
tree | 509f7d6e9383355704a83265196349e633addff8 /tests/009/json.txr | |
parent | 947b0979d05b190fee65698864cd1e14b5797f66 (diff) | |
download | txr-15cc57607711e8e3de2d97d67d04d72a8d08968b.tar.gz txr-15cc57607711e8e3de2d97d67d04d72a8d08968b.tar.bz2 txr-15cc57607711e8e3de2d97d67d04d72a8d08968b.zip |
iter-step: don't step through improper list terminators.
The issue is that iter-step will traverse (1 2 . 3)
into the 3, and then that is valid iterator which
continues via 4, 5, 6, ...
This affects the each operator family which use
iter-step.
* lib.c (iter_step): Handle CONS and LCONS specially now. If
the next object pulled via cdr is not a cons, and not nil,
then throw an error. The default case now only possibly
handles list-like sequences. Here we do something more generic
and expensive: we enforce that the next iterator must
be nil, or else a list-like sequence.
Diffstat (limited to 'tests/009/json.txr')
0 files changed, 0 insertions, 0 deletions