diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-09-16 20:14:29 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-09-16 20:14:29 -0700 |
commit | fd22fbc29fc0ee1a726880fa3bab64e187433854 (patch) | |
tree | a6d9dd45cc928333d34645cfa8fe6c2cea0adb26 /Makefile | |
parent | 3db9d4cb24375fc8fb84d0024f4e4b44be25c188 (diff) | |
download | txr-fd22fbc29fc0ee1a726880fa3bab64e187433854.tar.gz txr-fd22fbc29fc0ee1a726880fa3bab64e187433854.tar.bz2 txr-fd22fbc29fc0ee1a726880fa3bab64e187433854.zip |
Bugfix in tok-str: empty-match regexes.
* lib.c (tok_str): Only continue the loop if
the new position isn't past the end of the string.
This fixes the problem of recognizing an empty
token past the last character in the string.
Also, advance new_pos by one if there is a zero
length match. Then don't advance pos by one later
in that case. This fixes the bug that we collect
empty separator pieces *and* empty tokens,
and also prevents empty matches before the first
character of the string. Logic in tok_str is now very similar
to that in split_str_keep.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions