From: Kevin Day Date: Mon, 20 Jul 2020 04:06:16 +0000 (-0500) Subject: Bugfix: IKI read is not identifying cases with leading characters. X-Git-Tag: 0.5.0~67 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=443cf36855c5d2e138f150c19bbb9300269d1aeb;p=fll 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"'. --- 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);