From c1aa29cd7308129d8b392710f0835ee30eb08bd4 Mon Sep 17 00:00:00 2001 From: Laan Tungir Date: Wed, 13 Aug 2025 14:15:20 -0400 Subject: [PATCH] Version v0.2.48 - fixed checksum display to show exactly 8 characters with proper prefix highlighting --- otp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/otp.c b/otp.c index 723ff17..fca9fdd 100644 --- a/otp.c +++ b/otp.c @@ -2957,9 +2957,13 @@ int handle_pads_menu(void) { get_directory_display(full_path, dir_display, sizeof(dir_display)); // Display first 8 characters of checksum with prefix underlined - printf("\033[4m%.*s\033[0m%-*s %-12s %-12s %-12s %.1f%%\n", - prefix_lengths[i], pads[i].chksum, // Underlined prefix - 8 - prefix_lengths[i], pads[i].chksum + prefix_lengths[i], // Rest of 8-char checksum + char checksum_8char[9]; + strncpy(checksum_8char, pads[i].chksum, 8); + checksum_8char[8] = '\0'; + + printf("\033[4m%.*s\033[0m%s %-12s %-12s %-12s %.1f%%\n", + prefix_lengths[i], checksum_8char, // Underlined prefix + checksum_8char + prefix_lengths[i], // Rest of 8-char checksum dir_display, pads[i].size_str, pads[i].used_str,