FSBUILD-296 Fix VS2008 code analysis build

This commit is contained in:
Jeff Lenk 2010-08-24 08:55:00 -05:00
parent e5aef4cd9a
commit 62206e3d43
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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) {