From: Kevin Day Date: Thu, 27 Jul 2023 02:38:14 +0000 (-0500) Subject: Bugfix: Byte Dump program binary mode is printing wrong number of padding. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=d573cd5ee17d053d22aaec316c610e3b3dff7069;p=fll Bugfix: Byte Dump program binary mode is printing wrong number of padding. --- 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); }