瀏覽代碼

Fixes for various apps. swd_probe: untested

hedger 2 年之前
父節點
當前提交
af60bd27aa
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      stm32_sam.cpp

+ 4 - 5
stm32_sam.cpp

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