From: Kevin Day Date: Fri, 25 Sep 2026 21:58:27 +0000 (-0500) Subject: Update: Improve Basic List content read return handling when at end range or buffer. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=bf31a4723351780ba4b3cbd98fa7d869b6dd1927;p=fll Update: Improve Basic List content read return handling when at end range or buffer. The return state returns `F_okay_eos` or `F_okay_stop` accordingly. This can be inferred to be content found, but not consistently. It is better to return `F_content_found`. Anything using this can now more consistently rely on the `F_content_found` status. The end of string and buffer location checks should already be being performed by the caller anyway. The **API** doesn't go into details on this behavior which leaves room for this change without breaking **API** or **ABI**. This is back ported from ongoing changed from the `0.8` branch. --- diff --git a/level_1/fl_fss/c/fss/basic_list.c b/level_1/fl_fss/c/fss/basic_list.c index efcd5ecea..0f96ddf25 100644 --- a/level_1/fl_fss/c/fss/basic_list.c +++ b/level_1/fl_fss/c/fss/basic_list.c @@ -280,20 +280,16 @@ extern "C" { return status; } - if (range->start >= buffer.used) { - found->array[found->used].stop = buffer.used - 1; - - return F_none_eos; - } - - if (range->start > range->stop) { - found->array[found->used].stop = range->stop; - - return F_none_stop; - } - if (range->start > begin) { - found->array[found->used++].stop = range->start - 1; + if (range->start >= buffer.used) { + found->array[found->used++].stop = buffer.used - 1; + } + else if (range->start > range->stop) { + found->array[found->used++].stop = range->stop; + } + else { + found->array[found->used++].stop = range->start - 1; + } } else { found->array[found->used].start = 1;