Struan Clark 2 лет назад
Родитель
Сommit
1424655c48
4 измененных файлов с 5 добавлено и 7 удалено
  1. 1 1
      README.md
  2. 1 1
      helpers/flipbip_string.c
  3. 1 3
      helpers/flipbip_string.h
  4. 2 2
      views/flipbip_scene_1.c

+ 1 - 1
README.md

@@ -11,7 +11,7 @@ The goal of this project is to see how much crypto functionality can be brought
 - If you do not have one, download a Flipper Zero firmware to get the `fbt` build tool
 - Plug your Flipper Zero in via USB
 - Copy the contents of this folder into the `applications_user` folder of your firmware
-- Modify the `site_scons/cc.scons` file in the Flipper Zero firmware to remove the `"-Wdouble-promotion"` warning and add the `"-Os"` flag
+- Modify the `site_scons/cc.scons` file in the Flipper Zero firmware to add the `"-Os"` flag
 
 Then run the command: 
  ```

+ 1 - 1
helpers/flipbip_string.c

@@ -79,7 +79,7 @@ cont:
 
 
 void 
-flipbip_itox(uint8_t i, char *str)
+flipbip_btox(unsigned char i, char *str)
 {
     unsigned char n;
  

+ 1 - 3
helpers/flipbip_string.h

@@ -1,6 +1,4 @@
-#include <stdint.h>
-
 char * flipbip_strtok(char *s, const char *delim);
 char * flipbip_strtok_r(char *s, const char *delim, char **last);
 
-void flipbip_itox(uint8_t i, char *str);
+void flipbip_btox(unsigned char i, char *str);

+ 2 - 2
views/flipbip_scene_1.c

@@ -122,7 +122,7 @@ static void flipbip_scene_1_draw_seed(FlipBipScene1Model* const model) {
     char *seed_working = malloc(64 * 2 + 1);
     // Convert the seed to a hex string
     for (size_t i = 0; i < 64; i++) {
-        flipbip_itox(model->seed[i], seed_working + (i * 2));
+        flipbip_btox(model->seed[i], seed_working + (i * 2));
     }
     
     flipbip_scene_1_draw_generic(seed_working, 22);
@@ -165,7 +165,7 @@ static void flipbip_scene_1_draw_address(const HDNode* node, uint32_t addr_type,
         memcpy(address, "0x", 2);
         // Convert the hash to a hex string
         for (size_t i = 0; i < 20; i++) {
-            flipbip_itox(buf[i], address + 2 + (i * 2));
+            flipbip_btox(buf[i], address + 2 + (i * 2));
         }
         flipbip_scene_1_draw_generic(address, 12);
         memzero(address, 42 + 1);