mirror of
https://github.com/json-c/json-c.git
synced 2026-03-22 14:39:07 +08:00
Move a variable declaration to the start of the block to work better with older compilers.
This commit is contained in:
@@ -143,11 +143,11 @@ static int json_escape_str(struct printbuf *pb, const char *str, int len, int fl
|
||||
default:
|
||||
if(c < ' ')
|
||||
{
|
||||
char sbuf[7];
|
||||
if(pos - start_offset > 0)
|
||||
printbuf_memappend(pb,
|
||||
str + start_offset,
|
||||
pos - start_offset);
|
||||
char sbuf[7];
|
||||
snprintf(sbuf, sizeof(sbuf),
|
||||
"\\u00%c%c",
|
||||
json_hex_chars[c >> 4],
|
||||
|
||||
Reference in New Issue
Block a user