From cd6629fc75787cbfcbec12282bd738373bc46ac6 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 4 Feb 2018 18:25:04 +0100 Subject: [PATCH] lexer: fix encoding 7 bit escape sequences A misplaced paren caused escape sequences in the ranges \x00..\x7f, \u0000..\u007f and \0..\177 to get improperly encoded into the string buffer. Signed-off-by: Jo-Philipp Wich --- lexer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lexer.c b/lexer.c index 3661c24..ca5880e 100644 --- a/lexer.c +++ b/lexer.c @@ -55,7 +55,7 @@ utf8enc(char **out, int *rem, int code) if (*rem < 1) return false; - *(*out++) = code; (*rem)--; + *(*out)++ = code; (*rem)--; return true; } else if (code > 0 && code <= 0x7FF) -- 2.11.0