From b64402ede2043d3bdc96291e4f990007edbf0832 Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Sun, 9 Jul 2017 16:08:29 -0700 Subject: [PATCH] Move a variable declaration to the start of the block to work better with older compilers. --- json_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json_object.c b/json_object.c index bd65daf..ddc96bc 100644 --- a/json_object.c +++ b/json_object.c @@ -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],