]> Kevux Git Server - fll/commitdiff
Regression: Properly set the start range.
authorKevin Day <Kevin@kevux.org>
Sat, 10 Aug 2024 03:15:06 +0000 (22:15 -0500)
committerKevin Day <Kevin@kevux.org>
Sat, 10 Aug 2024 03:15:06 +0000 (22:15 -0500)
The optimization commit 2c0f62c1226b55b9fb546963e4751bd9c82a245b neglected to copy the `found->array[found->used].start` assignment.
It also failed to copy the error status check.

level_1/fl_fss/c/fss/basic.c

index c7c0e9268969e362338714d91cd33be0361c2218..2a3f36cb1219bbab79544ee9d04eb43d133bc205 100644 (file)
@@ -47,9 +47,13 @@ extern "C" {
       if (buffer.string[range->start] == f_fss_basic_close_s.string[0]) break;
     } // for
 
+    if (F_status_is_error_not(status)) {
+      status = f_string_ranges_increase(state.step_small, found);
+    }
+
     if (F_status_is_error(status)) return status;
 
-    status = f_string_ranges_increase(state.step_small, found);
+    found->array[found->used].start = begin;
 
     if (range->start > begin) {
       found->array[found->used++].stop = range->start - 1;