]> Kevux Git Server - fll/commitdiff
Bugfix: consistently handle last newline location in fss basic list read.
authorKevin Day <thekevinday@gmail.com>
Sat, 3 Oct 2020 21:39:16 +0000 (16:39 -0500)
committerKevin Day <thekevinday@gmail.com>
Sat, 3 Oct 2020 21:39:16 +0000 (16:39 -0500)
The last newline should not be included.
This is done in parts of the code, but not all of it.

level_1/fl_fss/c/fss_basic_list.c

index c9a3824bdc31bf5b89616dad1bbb691d4a188496..37af59a0273298b3efde1232b2c3e0eaf914946e 100644 (file)
@@ -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++;