]> Kevux Git Server - fll/commitdiff
Bugfix: The FSS Read process at should only process if index_at is non-zero.
authorKevin Day <Kevin@kevux.org>
Sat, 23 Nov 2024 03:08:58 +0000 (21:08 -0600)
committerKevin Day <Kevin@kevux.org>
Sat, 23 Nov 2024 04:51:48 +0000 (22:51 -0600)
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.

level_3/fss_read/c/embedded_list/process.c
level_3/fss_read/c/main/process.c

index fe2213c99fc7d849742697addcf9a5e402e16c6f..fe88ca33a333b213b8c5efa14ffdc1f90ceedd60 100644 (file)
@@ -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);
       }
     }
index 85951614873e7258425f5d96cf710af4a187ac84..330329cb9b1e63f6fe3d1c4d2b42cc1fc1c99bf3 100644 (file)
@@ -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;
         }