]> Kevux Git Server - fll/commitdiff
Bugfix: The delimited FSS lists are not properly setting the stop point.
authorKevin Day <Kevin@kevux.org>
Wed, 4 Sep 2024 23:47:23 +0000 (18:47 -0500)
committerKevin Day <Kevin@kevux.org>
Wed, 4 Sep 2024 23:47:23 +0000 (18:47 -0500)
This uses existing variables and shuffles the data around rather than defining a new variable.

level_1/fl_fss/c/private-fss-list.c

index 6cf14787bff60c703bed9d65dab79b60a4d2aefd..7b89330ad3e7ef3795a7c8de96e128bcd2f7d396 100644 (file)
@@ -191,8 +191,20 @@ extern "C" {
               } // while
 
               range->start = found->stop + 1;
+              found->start = stop;
+              found->stop = stop;
+
+              state->status = f_utf_buffer_decrement(buffer, found, 1);
+
+              if (F_status_is_error(state->status)) {
+                --range->start;
+                delimits->used = delimits_used;
+
+                return;
+              }
+
+              found->stop = found->start;
               found->start = start;
-              found->stop = stop + macro_f_utf_byte_width(buffer.string[stop]) - 1;
               state->status = F_fss_found_object;
             }
             else {