diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mds-kbdc/parse-error.c | 3 |
1 files changed, 2 insertions, 1 deletions
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++; |