aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/json.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/json.c b/src/json.c
index 9808db6fe..acdc5a156 100644
--- a/src/json.c
+++ b/src/json.c
@@ -1271,14 +1271,6 @@ json_parse_restart:
jsonParseAddNode(pParse, JSON_STRING | (jnFlags<<8), j+1-i, &z[i]);
return j+1;
}
- case 'n': {
- if( strncmp(z+i,"null",4)==0 && !sqlite3Isalnum(z[i+4]) ){
- jsonParseAddNode(pParse, JSON_NULL, 0, 0);
- return i+4;
- }
- pParse->iErr = i;
- return -1;
- }
case 't': {
if( strncmp(z+i,"true",4)==0 && !sqlite3Isalnum(z[i+4]) ){
jsonParseAddNode(pParse, JSON_TRUE, 0, 0);
@@ -1479,6 +1471,13 @@ json_parse_restart:
pParse->iErr = i;
return -1;
}
+ case 'n': {
+ if( strncmp(z+i,"null",4)==0 && !sqlite3Isalnum(z[i+4]) ){
+ jsonParseAddNode(pParse, JSON_NULL, 0, 0);
+ return i+4;
+ }
+ /* fall-through into the default case that checks for NaN */
+ }
default: {
u32 k;
int nn;