From 186f204893bf8efb08fb22da4e09bebb859bed99 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 22 Jun 2017 15:09:57 +0300 Subject: [PATCH] JSON: Fix \u escaping Remove the extra 'x' character from the escaped string. Signed-off-by: Jouni Malinen --- src/utils/json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/json.c b/src/utils/json.c index 3519c4884..c544b9918 100644 --- a/src/utils/json.c +++ b/src/utils/json.c @@ -50,7 +50,7 @@ void json_escape_string(char *txt, size_t maxlen, const char *data, size_t len) if (data[i] >= 32 && data[i] <= 126) { *txt++ = data[i]; } else { - txt += os_snprintf(txt, end - txt, "\\ux%04x", + txt += os_snprintf(txt, end - txt, "\\u%04x", data[i]); } break;