ui: fix backspace icon not shown in pin entry page (and checkmark icon in index entry page)
What changed, and why it matters
This commit fixes a user-interface bug where the backspace icon was missing on the PIN entry screen and the checkmark/enter icon was missing on the index entry screen. It changes the number of allowed on-screen characters so the correct icons are displayed. There is no security issue here.
No security action needed. Treat as a normal UI bug fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In main/ui/digit_entry.c, get_max_digit_entry_char() returns the count of selectable characters in the digit-entry UI. The previous values were off by one: DIGIT_ENTRY_INDEX returned NUM_ENTRY_DIGITS + 1 instead of +2 (failing to include the enter/checkmark icon), and the default PIN path returned NUM_ENTRY_DIGITS instead of +1 (failing to include the backspace icon). The patch corrects both counts. This is a pure UI fix with no cryptographic, authentication, or memory-safety implications.
Changed components
main/ui/digit_entry.cInspect captured patch +2 / −2
diff --git a/main/ui/digit_entry.c b/main/ui/digit_entry.c
index ad024a1..b152112 100644
--- a/main/ui/digit_entry.c
+++ b/main/ui/digit_entry.c
@@ -23,9 +23,9 @@ static inline bool entry_invert_navigation(void)
static uint32_t get_max_digit_entry_char(const digit_entry_t* digit_entry)
{
if (digit_entry->entry_type == DIGIT_ENTRY_INDEX) {
- return NUM_ENTRY_DIGITS + 1; // 0-9 + backspace + 'enter' to enter a short number
+ return NUM_ENTRY_DIGITS + 2; // 0-9 + backspace + 'enter' to enter a short number
}
- return NUM_ENTRY_DIGITS; // 0-9 + backspace only since PIN entry requires all digits
+ return NUM_ENTRY_DIGITS + 1; // 0-9 + backspace only since PIN entry requires all digits
}
static inline char get_current_digit_entry_char(const digit_entry_t* digit_entry)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.