From: Kevin Day Date: Tue, 3 Nov 2026 01:25:17 +0000 (-0600) Subject: Update: f_fss_count_slash() should not seek past combining joiners. X-Git-Url: https://www.git.kevux.org/?a=commitdiff_plain;h=5f1d2f06e38b80e464a4cca3bb4911cdb9f929b2;p=fll Update: f_fss_count_slash() should not seek past combining joiners. Stop at the first combining/joiner found and let the caller handle this situation. --- diff --git a/level_0/f_fss/c/fss.c b/level_0/f_fss/c/fss.c index 81d12beaa..6bb7e99d6 100644 --- a/level_0/f_fss/c/fss.c +++ b/level_0/f_fss/c/fss.c @@ -179,13 +179,6 @@ extern "C" { // A combining joiner invalidates as slash immediately before it and there is only a preceding slash if count > initial. if (*count > initial) --(*count); - - const f_status_t status = state->status; - - private_f_fss_skip_past_combining_joiner(buffer, range, state); - if (F_status_is_error(state->status)) return; - - state->status = status; } return; diff --git a/level_0/f_fss/c/fss.h b/level_0/f_fss/c/fss.h index 011ef85e6..d5c801dec 100644 --- a/level_0/f_fss/c/fss.h +++ b/level_0/f_fss/c/fss.h @@ -169,12 +169,15 @@ extern "C" { /** * Count the number of slashes from the given range in the buffer. * - * Use this to helpm determine how to apply slash delimits. + * Use this to help determine how to apply slash delimits. * * This does not initialize count, instead it only performs addition to line. * * This skips past (ignores) NULL (f_fss_placeholder_s). * + * This stops as the first combining or joiner character found. + * Thsis does not continue or seek past the first combining or joiner character found. + * * @param buffer * The string to process. * @param range diff --git a/level_0/f_fss/tests/unit/c/test-fss-count_slash.c b/level_0/f_fss/tests/unit/c/test-fss-count_slash.c index c69105cdc..f8d4115ea 100644 --- a/level_0/f_fss/tests/unit/c/test-fss-count_slash.c +++ b/level_0/f_fss/tests/unit/c/test-fss-count_slash.c @@ -156,10 +156,10 @@ void test__f_fss_count_slash__works(void **state) { 2, // "\\" 1, // "\\" buffers[15].used + 1, // "F_data_not" - 4, // "\\́" - 4, // "\\⁠J" - 5, // "\\\\́" - 5, // "\\\\⁠J" + 1, // "\\́" + 1, // "\\⁠J" + 2, // "\\\\́" + 2, // "\\\\⁠J" }; for (uint8_t i = 0; i < 20; ++i) {