blobmsg_json: fix \u escaping for control characters
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
parent
b9ebdbcc64
commit
7c5d2b3081
1 changed files with 1 additions and 1 deletions
|
@ -193,7 +193,7 @@ static void blobmsg_format_string(struct strbuf *s, const char *str)
|
||||||
|
|
||||||
if (escape == 'u') {
|
if (escape == 'u') {
|
||||||
sprintf(buf + 4, "%02x", (unsigned char) *p);
|
sprintf(buf + 4, "%02x", (unsigned char) *p);
|
||||||
len = 4;
|
len = 6;
|
||||||
} else {
|
} else {
|
||||||
len = 2;
|
len = 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue