From d573cd5ee17d053d22aaec316c610e3b3dff7069 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 26 Jul 2023 21:38:14 -0500 Subject: [PATCH] Bugfix: Byte Dump program binary mode is printing wrong number of padding. --- level_3/byte_dump/c/main/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/level_3/byte_dump/c/main/process.c b/level_3/byte_dump/c/main/process.c index 46f325a..8e73ead 100644 --- a/level_3/byte_dump/c/main/process.c +++ b/level_3/byte_dump/c/main/process.c @@ -246,7 +246,7 @@ extern "C" { ++cell.column; if (cell.column < main->setting.width) { - if (main->setting.flag & byte_dump_main_flag_unicode_e) { + if ((main->setting.flag & byte_dump_main_flag_unicode_e) || main->setting.mode == byte_dump_mode_binary_e) { if (!(cell.column % 4)) { f_print_dynamic_raw(f_string_space_s, main->program.output.to); } @@ -256,7 +256,7 @@ extern "C" { f_print_dynamic_raw(f_string_space_s, main->program.output.to); } } - else if (main->setting.mode == byte_dump_mode_duodecimal_e || main->setting.mode == byte_dump_mode_octal_e || main->setting.mode == byte_dump_mode_binary_e || main->setting.mode == byte_dump_mode_decimal_e) { + else if (main->setting.mode == byte_dump_mode_duodecimal_e || main->setting.mode == byte_dump_mode_octal_e || main->setting.mode == byte_dump_mode_decimal_e) { if (!(cell.column % 6)) { f_print_dynamic_raw(f_string_space_s, main->program.output.to); } -- 1.8.3.1