From 29595c80ec52713247b605aabdc0e61fc990d620 Mon Sep 17 00:00:00 2001 From: Krzysztof Gabis Date: Wed, 12 Dec 2012 20:28:35 +0100 Subject: [PATCH] Accepting DEL characters in strings. DEL characters are allowed according to JSON's specification (http://www.ietf.org/rfc/rfc4627.txt). Thanks to Fulvio Esposito for pointing this out. --- parson.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parson.c b/parson.c index 73047f1..38617e6 100644 --- a/parson.c +++ b/parson.c @@ -331,7 +331,8 @@ static const char * get_processed_string(const char **string) { return NULL; break; } - } else if (iscntrl((unsigned char)current_char)) { /* no control characters allowed */ + } else if (iscntrl((unsigned char)current_char) && + ((unsigned char)current_char != 0x7F)) { /* no control characters allowed (except DEL)*/ parson_free(output); return NULL; }