From 6602d2a1e81b72ce3947ea91bdbea0c741cc685d Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 27 Jun 2020 18:03:46 -0500 Subject: [PATCH] Bugfix: delimit placeholder not being applied in all cases The final exist should apply any delimits. When determining the remaining width, make sure that the range or buffer has not yet been exceeded. Not doing this resulted in an exit with an F_parameter error, further resulting in no delimits being applied. --- level_0/f_iki/c/iki.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/level_0/f_iki/c/iki.c b/level_0/f_iki/c/iki.c index 5762e42..6205aae 100644 --- a/level_0/f_iki/c/iki.c +++ b/level_0/f_iki/c/iki.c @@ -444,6 +444,8 @@ extern "C" { return status; } + if (range->start > range->stop || range->start >= buffer->used) break; + f_macro_iki_determine_width_max(buffer, range, width_max); status = f_utf_is_word_dash_plus(buffer->string + range->start, width_max); @@ -466,6 +468,10 @@ extern "C" { } } while (range->start <= range->stop && range->start < buffer->used); + for (f_array_length i = 0; i < delimits.used; i++) { + buffer->string[delimits.array[i]] = f_iki_syntax_placeholder; + } // for + f_macro_string_lengths_delete(status, delimits); if (F_status_is_error(status)) return status; -- 1.8.3.1