Преглед изворни кода

* Fix for #158

* Cosmetic refactoring
alex.kopachov пре 2 година
родитељ
комит
59aea11bdd

+ 1 - 1
flipperzero-firmware_official_dev

@@ -1 +1 @@
-Subproject commit d9a9fa0c10ab9c2dd480c6abf2d90fbf53b9e289
+Subproject commit 4ddfe05a5965200ea5c418c52376b42e99e575c4

+ 1 - 1
flipperzero-firmware_official_stable

@@ -1 +1 @@
-Subproject commit 406cb8b7116cc94d8f07e3c7fdac60df204ee3d4
+Subproject commit 27a8f29a686a76c2dc42e5fb17906c53b03b988b

+ 4 - 0
totp/totp_app.c

@@ -193,7 +193,11 @@ int32_t totp_app() {
     }
 
     // Affecting dolphin level
+#if defined(DOLPHIN_DEED)
     DOLPHIN_DEED(DolphinDeedPluginStart);
+#else
+    dolphin_deed(DolphinDeedPluginStart);
+#endif
 
     // Set system callbacks
     ViewPort* view_port = view_port_alloc();

+ 2 - 2
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) {