diff --git a/enhanced_exi_viewer.c b/enhanced_exi_viewer.c index 4298054..9431f4d 100644 --- a/enhanced_exi_viewer.c +++ b/enhanced_exi_viewer.c @@ -1036,13 +1036,11 @@ int main(int argc, char *argv[]) { } if (use_hex_output) { - // Terminal output: show hex string - printf("Encoded EXI data (%zu bytes):\n", pos); + // Terminal output: show hex string only for(size_t i = 0; i < pos; i++) { printf("%02X", buffer[i]); - if ((i + 1) % 32 == 0) printf("\n"); } - if (pos % 32 != 0) printf("\n"); + printf("\n"); } else { // Redirected output: write binary data fwrite(buffer, 1, pos, stdout);