Skip to content

Commit 7a72736

Browse files
Update sqdbg
1 parent 985ebc0 commit 7a72736

2 files changed

Lines changed: 409 additions & 145 deletions

File tree

sp/src/vscript/sqdbg/sqdbg/json.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,13 @@ static inline void PutStr( CBuffer *buffer, const string_t &str )
275275
#ifdef SQDBG_VALIDATE_SENT_MSG
276276
for ( unsigned int i = 0; i < str.len; i++ )
277277
{
278-
AssertMsg( IN_RANGE_CHAR( str.ptr[i], 0x20, 0x7E ) &&
279-
( ( str.ptr[i] != '\\' && str.ptr[i] != '\"' ) || ( i && str.ptr[i-1] == '\\' ) ),
280-
"control char in json string" );
278+
if ( str.ptr[i] == '\\' && ( str.ptr[i+1] == '\\' || str.ptr[i+1] == '\"' ) )
279+
{
280+
i++;
281+
continue;
282+
}
283+
284+
AssertMsg( IN_RANGE_CHAR( str.ptr[i], 0x20, 0x7E ), "control char in json string" );
281285
}
282286
#endif
283287
}

0 commit comments

Comments
 (0)