Эх сурвалжийг харах

【修复】当 char 有符号时,判断始终成立的问题

tangyuxin 7 жил өмнө
parent
commit
4aeb0ab80f
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      port/mphalport.c

+ 1 - 1
port/mphalport.c

@@ -37,7 +37,7 @@ int mp_hal_stdin_rx_chr(void) {
     char ch;
     while (1) {
         ch = rtt_getchar();
-        if (ch != 0xFF) {
+        if (ch != (char)0xFF) {
             break;
         }
         MICROPY_EVENT_POLL_HOOK;