소스 검색

fix: add break in UTF-16 handling

Introducing the switch defaults in an earlier commit made UTF-16 \u
sequence handling broken.
Max Bruckner 8 년 전
부모
커밋
ee0c920dff
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      cJSON.c

+ 1 - 0
cJSON.c

@@ -665,6 +665,7 @@ static const unsigned char *parse_string(cJSON *item, const unsigned char *str,
                             /* depending on the length in bytes this determines the
                              * encoding ofthe first UTF8 byte */
                             *--ptr2 = (unsigned char)((uc | firstByteMark[len]) & 0xFF);
+                            break;
                         default:
                             *ep = str;
                             return NULL;