From 255766aec0fbcc038eea13b222cb6d2deb5b779b Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 25 Feb 2022 21:45:37 -0600 Subject: [PATCH] Bugfix: Improper if condition range check. This is supposed to check the start and stop range, but accidentally checks the start range on both side. This mistake appears to have been copy pasted quite a few times. --- level_1/fl_print/c/private-print.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/level_1/fl_print/c/private-print.c b/level_1/fl_print/c/private-print.c index 983b1b8..e4af705 100644 --- a/level_1/fl_print/c/private-print.c +++ b/level_1/fl_print/c/private-print.c @@ -270,7 +270,7 @@ extern "C" { except_in = va_arg(*ap, f_string_ranges_t); } - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -293,7 +293,7 @@ extern "C" { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -316,7 +316,7 @@ extern "C" { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = f_string_ranges_t_initialize; - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -387,7 +387,7 @@ extern "C" { except_in = va_arg(*ap, f_string_ranges_t); } - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -410,7 +410,7 @@ extern "C" { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -433,7 +433,7 @@ extern "C" { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = f_string_ranges_t_initialize; - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -668,7 +668,7 @@ extern "C" { except_in = va_arg(*ap, f_string_ranges_t); } - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -691,7 +691,7 @@ extern "C" { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -714,7 +714,7 @@ extern "C" { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -792,7 +792,7 @@ extern "C" { except_in = va_arg(*ap, f_string_ranges_t); } - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -815,7 +815,7 @@ extern "C" { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; @@ -838,7 +838,7 @@ extern "C" { const f_array_lengths_t except_at = f_array_lengths_t_initialize; const f_string_ranges_t except_in = va_arg(*ap, f_string_ranges_t); - if (partial.start > partial.start) { + if (partial.start > partial.stop) { *status = F_data_not; return string; -- 1.8.3.1