From 5c177ca1bf0dc647ae25301749a064f3be940530 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 9 Aug 2024 22:15:06 -0500 Subject: [PATCH] Regression: Properly set the start range. 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/level_1/fl_fss/c/fss/basic.c b/level_1/fl_fss/c/fss/basic.c index c7c0e92..2a3f36c 100644 --- a/level_1/fl_fss/c/fss/basic.c +++ b/level_1/fl_fss/c/fss/basic.c @@ -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; -- 1.8.3.1