1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-09 14:21:03 +03:00

Use an assert() to fix a harmless static analyzer warning.

FossilOrigin-Name: a249ca657e624028bc6b3d2c2bcedd7162d118addb7d62ce519920cecebf1860
This commit is contained in:
drh
2023-12-05 01:44:15 +00:00
parent ae2e972802
commit fa43e21711
3 changed files with 8 additions and 7 deletions

View File

@@ -3873,6 +3873,7 @@ static void jsonErrorFunc(
}else{
/* Convert byte-offset s.iErr into a character offset */
u32 k;
assert( s.zJson!=0 ); /* Because s.oom is false */
for(k=0; k<s.iErr && ALWAYS(s.zJson[k]); k++){
if( (s.zJson[k] & 0xc0)!=0x80 ) iErrPos++;
}