Add failing test for a json with content zero (#134)

* Add failing test for a json with content zero

* Mark 0 byte as false in structural_or_whitespace_or_exponent_or_decimal_negated
This commit is contained in:
Heinz N. Gies 2019-05-09 18:24:22 +02:00 committed by Daniel Lemire
parent 20cda07eef
commit c5a3f9ccd4
2 changed files with 2 additions and 1 deletions

View File

@ -86,7 +86,7 @@ static inline bool is_integer(char c) {
// probably frequent and it is hard than it looks. We are building all of this
// just to differentiate between 0x1 (invalid), 0,1 (valid) 0e1 (valid)...
const bool structural_or_whitespace_or_exponent_or_decimal_negated[256] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1,

1
jsonchecker/pass16.json Normal file
View File

@ -0,0 +1 @@
0