FSBUILD-296 Fix VS2008 code analysis build
This commit is contained in:
parent
e5aef4cd9a
commit
62206e3d43
|
@ -163,7 +163,7 @@ static const char *parse_string(cJSON *item,const char *str)
|
|||
case 'r': *ptr2++='\r'; break;
|
||||
case 't': *ptr2++='\t'; break;
|
||||
case 'u': // transcode utf16 to utf8. DOES NOT SUPPORT SURROGATE PAIRS CORRECTLY.
|
||||
sscanf(ptr+1,"%4x",&uc); // get the unicode char.
|
||||
if (sscanf(ptr+1,"%4x",&uc) < 1) break; // get the unicode char.
|
||||
len=3;if (uc<0x80) len=1;else if (uc<0x800) len=2;ptr2+=len;
|
||||
|
||||
switch (len) {
|
||||
|
|
|
@ -162,7 +162,7 @@ static const char *parse_string(cJSON *item,const char *str)
|
|||
case 'r': *ptr2++='\r'; break;
|
||||
case 't': *ptr2++='\t'; break;
|
||||
case 'u': // transcode utf16 to utf8. DOES NOT SUPPORT SURROGATE PAIRS CORRECTLY.
|
||||
sscanf(ptr+1,"%4x",&uc); // get the unicode char.
|
||||
if (sscanf(ptr+1,"%4x",&uc) < 1) break; // get the unicode char.
|
||||
len=3;if (uc<0x80) len=1;else if (uc<0x800) len=2;ptr2+=len;
|
||||
|
||||
switch (len) {
|
||||
|
|
Loading…
Reference in New Issue