aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/json.c b/src/json.c
index 095ae870b..83bf3e733 100644
--- a/src/json.c
+++ b/src/json.c
@@ -603,7 +603,7 @@ static void jsonAppendString(JsonString *p, const char *zIn, u32 N){
p->zBuf[p->nUsed++] = '"';
while( 1 /*exit-by-break*/ ){
k = 0;
- while( k<N-1 && jsonIsOk[z[k]] && jsonIsOk[z[k+1]] ){ k += 2; }
+ while( k+1<N && jsonIsOk[z[k]] && jsonIsOk[z[k+1]] ){ k += 2; }
while( k<N && jsonIsOk[z[k]] ){ k++; }
if( k>=N ){
if( k>0 ){