提交 62206e3d authored 作者: Jeff Lenk's avatar Jeff Lenk

FSBUILD-296 Fix VS2008 code analysis build

上级 e5aef4cd
......@@ -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) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论