From b62d120580edeaae4e50a63f44ef15ab460d42fc Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Fri, 13 Apr 2007 21:34:12 +0000 Subject: Fix processing of control characters; they should be escaped as \u sequences. --- ext/json/json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/json/json.c') diff --git a/ext/json/json.c b/ext/json/json.c index 809d005c57..93aec133f0 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -303,7 +303,7 @@ static void json_escape_string(smart_str *buf, char *s, int len) break; default: { - if (us < ' ' || (us & 127) == us) + if (us >= ' ' && (us & 127) == us) { smart_str_appendc(buf, (unsigned char) us); } -- cgit v1.2.1