From: Kevin Day Date: Sat, 23 Nov 2024 03:08:58 +0000 (-0600) Subject: Bugfix: The FSS Read process at should only process if index_at is non-zero. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=a71fc6db132acdeb5380a2733972bca12584fddf;p=fll Bugfix: The FSS Read process at should only process if index_at is non-zero. The FSS Embedded Read recursive logic exposes this problem. The at flag bit is set when the at parameter is passed. The at parameter being passed when there are multiple depths does not mean that the specific depth in question should be using the at position. Add a check that ensures that the current depth needs the at position processed. --- diff --git a/level_3/fss_read/c/embedded_list/process.c b/level_3/fss_read/c/embedded_list/process.c index fe2213c..fe88ca3 100644 --- a/level_3/fss_read/c/embedded_list/process.c +++ b/level_3/fss_read/c/embedded_list/process.c @@ -70,9 +70,8 @@ extern "C" { main->callback.process_total(main, names); } } - else if (main->setting.flag & fss_read_main_flag_at_d) { + else if ((main->setting.flag & fss_read_main_flag_at_d) && main->setting.depth.index_at) { if (main->callback.process_at) { - main->callback.process_at(main, names, *delimits_object, *delimits_content); } } diff --git a/level_3/fss_read/c/main/process.c b/level_3/fss_read/c/main/process.c index 8595161..330329c 100644 --- a/level_3/fss_read/c/main/process.c +++ b/level_3/fss_read/c/main/process.c @@ -67,7 +67,7 @@ extern "C" { main->callback.process_total(main, names); } } - else if (main->setting.flag & fss_read_main_flag_at_d) { + else if ((main->setting.flag & fss_read_main_flag_at_d) && main->setting.depth.index_at) { if (main->callback.process_at) { main->callback.process_at(main, names, *delimits_object, *delimits_content); @@ -539,7 +539,7 @@ extern "C" { if (!names[i]) continue; if (fss_read_signal_check(main)) return; - if (main->setting.flag & fss_read_main_flag_at_d) { + if ((main->setting.flag & fss_read_main_flag_at_d) && main->setting.depth.index_at) { if (main->setting.depth.value_at != i) continue; } @@ -555,7 +555,7 @@ extern "C" { } } // for } - else if (main->setting.flag & fss_read_main_flag_at_d) { + else if ((main->setting.flag & fss_read_main_flag_at_d) && main->setting.depth.index_at) { for (f_number_unsigned_t at = 0; i < main->setting.objects.used; ++i) { if (!names[i]) continue; @@ -623,7 +623,7 @@ extern "C" { if (!names[at]) continue; if (fss_read_signal_check(main)) return; - if (main->setting.flag & fss_read_main_flag_at_d) { + if ((main->setting.flag & fss_read_main_flag_at_d) && main->setting.depth.index_at) { if (main->setting.depth.value_at != at) continue; } @@ -689,7 +689,7 @@ extern "C" { if (!names[at]) continue; if (fss_read_signal_check(main)) return; - if (main->setting.flag & fss_read_main_flag_at_d) { + if ((main->setting.flag & fss_read_main_flag_at_d) && main->setting.depth.index_at) { if (main->setting.depth.value_at != at) continue; }