From 2e7953536e94cd140104ffe8ee92727a587515e0 Mon Sep 17 00:00:00 2001 From: Takashi Sogabe Date: Tue, 4 Dec 2012 17:39:24 +0900 Subject: Fix loss of MSB in conditions of octal formatted string --- src/parse.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/parse.y b/src/parse.y index bfea1f69c..19e6bf23e 100644 --- a/src/parse.y +++ b/src/parse.y @@ -3307,7 +3307,8 @@ read_escape(parser_state *p) int buf[3]; int i; - for (i=0; i<3; i++) { + buf[0] = c; + for (i=1; i<3; i++) { buf[i] = nextc(p); if (buf[i] == -1) goto eof; if (buf[i] < '0' || '7' < buf[i]) { -- cgit v1.2.3