mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Fixes to error handling in json_array_length().
FossilOrigin-Name: aa85df2d26b74c171c55bde19ef17c4f11f40b8af7181bbf7162f87cdea7e88b
This commit is contained in:
@@ -3115,11 +3115,7 @@ static void jsonArrayLengthFunc(
|
||||
if( (p->aBlob[i] & 0x0f)==JSONB_ARRAY ){
|
||||
cnt = jsonbArrayCount(p, i);
|
||||
}
|
||||
if( eErr ){
|
||||
if( eErr==2 ) sqlite3_result_error(ctx, "malformed JSON", -1);
|
||||
}else{
|
||||
sqlite3_result_int64(ctx, cnt);
|
||||
}
|
||||
if( !eErr ) sqlite3_result_int64(ctx, cnt);
|
||||
jsonParseFree(p);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user