diff options
author | drh <> | 2023-10-03 21:54:09 +0000 |
---|---|---|
committer | drh <> | 2023-10-03 21:54:09 +0000 |
commit | f362731c1cba8f46cba7b978705573d9e0a1eb51 (patch) | |
tree | 9b7aac1970e90e5cd7bd89a8ec1c9234c4da7971 /src/json.c | |
parent | 51cc3041fe03a7ede42c5286d92bbdf7adbfb276 (diff) | |
download | sqlite-f362731c1cba8f46cba7b978705573d9e0a1eb51.tar.gz sqlite-f362731c1cba8f46cba7b978705573d9e0a1eb51.zip |
Fix a bug in the jsonReturnFromBlob() function that causes a positive result
for a negative value for when a JSON integer is too large and needs to be
converted into double.
FossilOrigin-Name: dca684da0c29ec78460362f972ea7747be42c13c4d1325da9d62c1ea58022e39
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c index 967a3af00..e29940c72 100644 --- a/src/json.c +++ b/src/json.c @@ -3856,6 +3856,7 @@ static void jsonReturnFromBlob( }else if( rc==3 && bNeg ){ sqlite3_result_int64(pCtx, SMALLEST_INT64); }else{ + if( bNeg ){ n--; sz++; } goto to_double; } break; |