fix_json_type_opaque_parse_err (#2318)

对于`JSONB_TYPE_OPAQUE`类型的解析计算`q_max_bytes`时,多算了`1`字节
This commit is contained in:
littleneko
2020-02-28 12:15:09 +08:00
committed by GitHub
parent bd56438eca
commit 0d5505aa2c

View File

@@ -167,7 +167,7 @@ public class JsonConversion {
int type_byte = buffer.getUint8();
int position = buffer.position();
// Then there's the length of the value.
int q_max_bytes = (int) Math.min(len, 5);
int q_max_bytes = (int) Math.min(len - 1, 5);
long q_tlen = 0;
long q_str_len = 0;
long q_n = 0;