From 0540c2743f7fd9670c0ca39eb95cd5ceb8ba3476 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Sat, 24 Jun 2023 18:34:33 +0300 Subject: [PATCH] Update totp --- applications/external/totp/workers/type_code_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/external/totp/workers/type_code_common.c b/applications/external/totp/workers/type_code_common.c index bc42fadaa..82a5a028e 100644 --- a/applications/external/totp/workers/type_code_common.c +++ b/applications/external/totp/workers/type_code_common.c @@ -52,10 +52,10 @@ void totp_type_code_worker_execute_automation( while(i < code_buffer_size && (cb_char = code_buffer[i]) != 0) { uint8_t char_index = CONVERT_CHAR_TO_DIGIT(cb_char); if(char_index > 9) { - char_index = cb_char - 0x41 + 10; + char_index = cb_char - 'A' + 10; } - if(char_index > 35) break; + if(char_index >= sizeof(hid_number_keys)) break; uint16_t hid_kb_key = hid_number_keys[char_index]; if(char_index > 9) {