From: Kevin Day Date: Sat, 3 Oct 2020 21:39:16 +0000 (-0500) Subject: Bugfix: consistently handle last newline location in fss basic list read. X-Git-Tag: 0.5.1~46 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=aaedd47d5287885429dfc87309be1154e24d32de;p=fll Bugfix: consistently handle last newline location in fss basic list read. The last newline should not be included. This is done in parts of the code, but not all of it. --- diff --git a/level_1/fl_fss/c/fss_basic_list.c b/level_1/fl_fss/c/fss_basic_list.c index c9a3824..37af59a 100644 --- a/level_1/fl_fss/c/fss_basic_list.c +++ b/level_1/fl_fss/c/fss_basic_list.c @@ -287,7 +287,7 @@ extern "C" { if (found_newline) { fl_macro_fss_apply_delimit_placeholders((*buffer), delimits); - found->array[found->used].stop = last_newline; + found->array[found->used].stop = last_newline - 1; range->start = last_newline + 1; found->used++; @@ -355,7 +355,7 @@ extern "C" { if (found_newline) { fl_macro_fss_apply_delimit_placeholders((*buffer), delimits); - found->array[found->used].stop = last_newline; + found->array[found->used].stop = last_newline - 1; range->start = last_newline + 1; found->used++;