mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-07 06:25:03 +00:00
Fix UTF-8 backward iteration
Ouch!
This commit is contained in:
parent
5669a6cf41
commit
e13f8d280b
1 changed files with 2 additions and 2 deletions
|
@ -77,8 +77,8 @@ hb_utf_prev (const uint8_t *text,
|
|||
const uint8_t *start,
|
||||
hb_codepoint_t *unicode)
|
||||
{
|
||||
const uint8_t *end = text;
|
||||
while (start < text && (*--text & 0xc0) == 0x80 && end - text < 4)
|
||||
const uint8_t *end = text--;
|
||||
while (start < text && (*text & 0xc0) == 0x80 && end - text < 4)
|
||||
text--;
|
||||
|
||||
hb_codepoint_t c = *text, mask;
|
||||
|
|
Loading…
Add table
Reference in a new issue