Version v0.2.48 - fixed checksum display to show exactly 8 characters with proper prefix highlighting
This commit is contained in:
10
otp.c
10
otp.c
@@ -2957,9 +2957,13 @@ int handle_pads_menu(void) {
|
|||||||
get_directory_display(full_path, dir_display, sizeof(dir_display));
|
get_directory_display(full_path, dir_display, sizeof(dir_display));
|
||||||
|
|
||||||
// Display first 8 characters of checksum with prefix underlined
|
// Display first 8 characters of checksum with prefix underlined
|
||||||
printf("\033[4m%.*s\033[0m%-*s %-12s %-12s %-12s %.1f%%\n",
|
char checksum_8char[9];
|
||||||
prefix_lengths[i], pads[i].chksum, // Underlined prefix
|
strncpy(checksum_8char, pads[i].chksum, 8);
|
||||||
8 - prefix_lengths[i], pads[i].chksum + prefix_lengths[i], // Rest of 8-char checksum
|
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,
|
dir_display,
|
||||||
pads[i].size_str,
|
pads[i].size_str,
|
||||||
pads[i].used_str,
|
pads[i].used_str,
|
||||||
|
|||||||
Reference in New Issue
Block a user