Only handle errors if we have not parsed a complete object (#1999)
* Only handle errors if we have not parsed a complete object * Fix typo which means that \n was not an ending character
This commit is contained in:
parent
216b820d08
commit
438f1609f6
|
@ -56,7 +56,9 @@ static int error_callback(jsonsl_t jsn,
|
|||
char *at)
|
||||
{
|
||||
JSN_DATA *data = (JSN_DATA *) jsn->data;
|
||||
data->error = jsonsl_strerror(err);
|
||||
if (!data->complete) {
|
||||
data->error = jsonsl_strerror(err);
|
||||
}
|
||||
|
||||
//fprintf(stderr, "Got error at pos %lu: %s\n", jsn->pos, jsonsl_strerror(err));
|
||||
return 0;
|
||||
|
|
|
@ -1484,7 +1484,7 @@ static const char Special_Endings[0x100] = {
|
|||
/* 0xfe */ 0 /* 0xfe */
|
||||
};
|
||||
static const uint32_t Special_Endings_bits[0x80 / 32] = {
|
||||
0b00000000110010000000000000000000,
|
||||
0b00000000011001000000000000000000,
|
||||
0b10100000000010000000000000100000,
|
||||
0b00000000000000000000000000011100,
|
||||
0b00000000000000000000000000010100
|
||||
|
|
Loading…
Reference in New Issue