Просмотр исходного кода

Merge pull request #7 from leha-bot/fix/build-on-rel-fw

Fix build on fresh Flipper firmware
Struan 1 год назад
Родитель
Сommit
8bce552603
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      helpers/flipchess_file.c
  2. 2 2
      sam/stm32_sam.cpp

+ 1 - 1
helpers/flipchess_file.c

@@ -16,10 +16,10 @@
 bool flipchess_has_file(const FlipChessFile file_type, const char* file_name, const bool remove) {
     bool ret = false;
     const char* path;
+    char path_buf[FILE_MAX_PATH_LEN] = {0};
     if(file_type == FlipChessFileBoard) {
         path = FLIPCHESS_BOARD_PATH;
     } else {
-        char path_buf[FILE_MAX_PATH_LEN] = {0};
         strcpy(path_buf, FLIPCHESS_APP_BASE_FOLDER); // 22
         strcpy(path_buf + strlen(path_buf), "/");
         strcpy(path_buf + strlen(path_buf), file_name);

+ 2 - 2
sam/stm32_sam.cpp

@@ -4510,7 +4510,7 @@ void STM32SAM::AdjustLengths() {
                 mem56 = flags[index];
 
             // not a consonant
-            if((flags[index] & 64) == 0) {
+            if((index != 255 && flags[index] & 64) == 0) {
                 // RX or LX?
                 if((index == 18) || (index == 19)) // 'RX' & 'LX'
                 {
@@ -5700,4 +5700,4 @@ inline void STM32SAM::SetAUDIO(unsigned char main_volume) {
     }
 
     LL_TIM_OC_SetCompareCH1(FURI_HAL_SPEAKER_TIMER, data);
-}
+}