From 443cf36855c5d2e138f150c19bbb9300269d1aeb Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 19 Jul 2020 23:06:16 -0500 Subject: [PATCH] Bugfix: IKI read is not identifying cases with leading characters. An IKI read string that begins with text that is potentially valid, followed by non-IKI name characters, and finally followed by a valid IKI variable name is not detected. Example: Should=define:"value". The above didn't resolve, but with this fix should now find the full IKI variable: 'define:"value"'. --- level_0/f_iki/c/iki.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/level_0/f_iki/c/iki.c b/level_0/f_iki/c/iki.c index ec5708b..96c7cae 100644 --- a/level_0/f_iki/c/iki.c +++ b/level_0/f_iki/c/iki.c @@ -152,7 +152,25 @@ extern "C" { return status; } - if (status == F_false) break; + // current word-dash-plus block is not a valid variable name, try again. + if (status == F_false) { + f_macro_iki_seek_word_dash_plus(status, buffer, range, width_max, F_true); + + if (F_status_is_error(status)) { + f_macro_string_lengths_delete(status, delimits); + return status; + } + else if (range->start > range->stop) { + f_macro_string_lengths_delete(status, delimits); + return F_data_not_stop; + } + else if (range->start >= buffer->used) { + f_macro_string_lengths_delete(status, delimits); + return F_data_not_eos; + } + + found_vocabulary.start = range->start; + } } status = f_utf_buffer_increment(*buffer, range, 1); -- 1.8.3.1