… | |
… | |
949 | else if (expect_true (ch >= 0x20 && ch < 0x80)) |
949 | else if (expect_true (ch >= 0x20 && ch < 0x80)) |
950 | *cur++ = ch; |
950 | *cur++ = ch; |
951 | else if (ch >= 0x80) |
951 | else if (ch >= 0x80) |
952 | { |
952 | { |
953 | STRLEN clen; |
953 | STRLEN clen; |
954 | UV uch; |
|
|
955 | |
954 | |
956 | --dec_cur; |
955 | --dec_cur; |
957 | |
956 | |
958 | uch = decode_utf8 (dec_cur, dec->end - dec_cur, &clen); |
957 | decode_utf8 (dec_cur, dec->end - dec_cur, &clen); |
959 | if (clen == (STRLEN)-1) |
958 | if (clen == (STRLEN)-1) |
960 | ERR ("malformed UTF-8 character in JSON string"); |
959 | ERR ("malformed UTF-8 character in JSON string"); |
961 | |
960 | |
962 | do |
961 | do |
963 | *cur++ = *dec_cur++; |
962 | *cur++ = *dec_cur++; |