]> Kevux Git Server - fll/commitdiff
Bugfix: Byte Dump program binary mode is printing wrong number of padding.
authorKevin Day <kevin@kevux.org>
Thu, 27 Jul 2023 02:38:14 +0000 (21:38 -0500)
committerKevin Day <kevin@kevux.org>
Thu, 27 Jul 2023 02:38:14 +0000 (21:38 -0500)
level_3/byte_dump/c/main/process.c

index 46f325a748829537c39a78234dcf7e5890fad7de..8e73eadf8ae336910a78efb1225c89991640d2f7 100644 (file)
@@ -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);
             }