From: Kevin Day Date: Sat, 27 Jun 2020 23:03:46 +0000 (-0500) Subject: Bugfix: delimit placeholder not being applied in all cases X-Git-Tag: 0.5.0~121 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=6602d2a1e81b72ce3947ea91bdbea0c741cc685d;p=fll 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. --- 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;