mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Fix a bug in json_array_length() introduced in version 3.43.0 by
check-in [df099ad713011b67]. If the JSON input comes from json_remove(), the removed array entries are still counted as part of the array length. FossilOrigin-Name: 69a635958a4a14187e88dd297df8978a4805b1b0c7bff3ec29d5632c0f68d889
This commit is contained in:
@@ -2484,7 +2484,9 @@ static void jsonArrayLengthFunc(
|
||||
}
|
||||
if( pNode->eType==JSON_ARRAY ){
|
||||
while( 1 /*exit-by-break*/ ){
|
||||
for(i=1; i<=pNode->n; n++){
|
||||
i = 1;
|
||||
while( i<=pNode->n ){
|
||||
if( (pNode[i].jnFlags & JNODE_REMOVE)==0 ) n++;
|
||||
i += jsonNodeSize(&pNode[i]);
|
||||
}
|
||||
if( (pNode->jnFlags & JNODE_APPEND)==0 ) break;
|
||||
|
||||
Reference in New Issue
Block a user