Skip to content

Commit

Permalink
Fix incorrect hex value of 127 (DEL) and typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ubavic authored and alt-romes committed Jul 19, 2023
1 parent a9552ce commit 9098fc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static void printhistory(numberstack* numbers, int priority) {

static void display_ascii_hex(uint64_t value, int priority) {
// ASCII not enabled, just display HEX
// Or ASCII out of rante
// Or ASCII out of range
if ((hex_enabled && !ascii_enabled) || value > 127) {
mvwprintw_colors(displaywin, priority, 2, COLOR_PAIR_HEX, "Hex: 0x%llX", value);
return;
Expand Down Expand Up @@ -154,7 +154,7 @@ static void display_ascii_hex(uint64_t value, int priority) {
}
// Display DEL (Dec: 127)
else if (value == 127) {
mvwprintw_colors(displaywin, priority, 2, COLOR_PAIR_HEX, "Hex: 0x%llX ASCII: DEL");
mvwprintw_colors(displaywin, priority, 2, COLOR_PAIR_HEX, "Hex: 0x7F ASCII: DEL");
}
else {
// Display printable characters
Expand Down

0 comments on commit 9098fc8

Please sign in to comment.