From bc7ca0df8f79a76177c3c42d11a1034015ec345f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 17 Nov 2014 09:17:37 +0100 Subject: missed if statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-kbdc/parse-error.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mds-kbdc/parse-error.c b/src/mds-kbdc/parse-error.c index 298c712..dfaf116 100644 --- a/src/mds-kbdc/parse-error.c +++ b/src/mds-kbdc/parse-error.c @@ -73,7 +73,8 @@ void mds_kbdc_parse_error_print(const mds_kbdc_parse_error_t* restrict this, FIL /* Convert bytes count to character count for the code position */ for (i = 0, n = this->start; i < n; i++) - start++; + if ((code[i] & 0xC0) != 0x80) + start++; for (n = this->end; i < n; i++) if ((code[i] & 0xC0) != 0x80) end++; -- cgit v1.2.3-70-g09d2