Skip to content

Commit 59aea11

Browse files
committed
* Fix for #158
* Cosmetic refactoring
1 parent 4a77d64 commit 59aea11

4 files changed

+8
-4
lines changed

totp/totp_app.c

+4
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,11 @@ int32_t totp_app() {
193193
}
194194

195195
// Affecting dolphin level
196+
#if defined(DOLPHIN_DEED)
196197
DOLPHIN_DEED(DolphinDeedPluginStart);
198+
#else
199+
dolphin_deed(DolphinDeedPluginStart);
200+
#endif
197201

198202
// Set system callbacks
199203
ViewPort* view_port = view_port_alloc();

totp/workers/type-code-common.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ void totp_type_code_worker_execute_automation(
5252
while(i < code_buffer_size && (cb_char = code_buffer[i]) != 0) {
5353
uint8_t char_index = CONVERT_CHAR_TO_DIGIT(cb_char);
5454
if(char_index > 9) {
55-
char_index = cb_char - 0x41 + 10;
55+
char_index = cb_char - 'A' + 10;
5656
}
5757

58-
if(char_index > 35) break;
58+
if(char_index >= sizeof(hid_number_keys)) break;
5959

6060
uint16_t hid_kb_key = hid_number_keys[char_index];
6161
if(char_index > 9) {

0 commit comments

Comments
 (0)