Jelajahi Sumber

Merge pull request #1 from hedger/main

Fixes for ufbt
Struan Clark 2 tahun lalu
induk
melakukan
e98d803a32
2 mengubah file dengan 4 tambahan dan 6 penghapusan
  1. 0 1
      helpers/flipchess_file.c
  2. 4 5
      sam/stm32_sam.cpp

+ 0 - 1
helpers/flipchess_file.c

@@ -1,6 +1,5 @@
 #include "flipchess_file.h"
 #include <storage/storage.h>
-#include <applications.h>
 #include <loader/loader.h>
 
 // #define FLIPCHESS_APP_BASE_FOLDER APP_BOARDA_PATH("flipchess")

+ 4 - 5
sam/stm32_sam.cpp

@@ -5400,15 +5400,14 @@ void STM32SAM::sam(
         }
     }
 
+    if(i < 256) {
+        input[i] = phonetic ? '\x9b' : '[';
+    }
+
     if(!phonetic) {
-        strncat(input, "[", 256);
         if(!TextToPhonemes((unsigned char*)input)) {
-            // PrintUsage();
             return;
         }
-
-    } else {
-        strncat(input, "\x9b", 256);
     }
 
     SetInput(input);