From 70a92ef4a93342b6a97c00291a2376ae0d488cb3 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 31 Aug 2024 20:44:10 -0500 Subject: [PATCH] Bugfix: Empty Content lines with no Object printed should not be included for FSS Embedded List. The FSS Embedded List standard (FSS-0008) should not display any lines when Content is empty and Objects are not being printed. --- level_3/fss_embedded_list_read/c/private-read.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/level_3/fss_embedded_list_read/c/private-read.c b/level_3/fss_embedded_list_read/c/private-read.c index 97cd259..bdd5a2c 100644 --- a/level_3/fss_embedded_list_read/c/private-read.c +++ b/level_3/fss_embedded_list_read/c/private-read.c @@ -681,11 +681,8 @@ extern "C" { data->main->signal_check = 0; } - if (!items->array[i].content.used) { - if (include_empty) { - ++total; - } - + // Empty is not counted here because empty Content has no lines when there is no Object being printed. + if (!items->array[i].content.used || items->array[i].content.array[0].start > items->array[i].content.array[0].stop) { continue; } @@ -730,17 +727,8 @@ extern "C" { if (skip[i]) continue; - if (!items->array[i].content.used) { - if (include_empty) { - if (line_current == line) { - fss_embedded_list_read_print_set_end(data); - - break; - } - - ++line_current; - } - + // Empty is not counted here because empty Content has no lines when there is no Object being printed. + if (!items->array[i].content.used || items->array[i].content.array[0].start > items->array[i].content.array[0].stop) { continue; } @@ -792,11 +780,8 @@ extern "C" { if (skip[i]) continue; + // Empty is not counted here because empty Content has no lines when there is no Object being printed. if (!items->array[i].content.used || items->array[i].content.array[0].start > items->array[i].content.array[0].stop) { - if (include_empty) { - fss_embedded_list_read_print_set_end(data); - } - continue; } -- 1.8.3.1