Add note about UTF-8 decoder

This commit is contained in:
Behdad Esfahbod 2010-05-27 14:04:15 -04:00
parent 226faa58f4
commit 2163afbf35
1 changed files with 2 additions and 0 deletions

View File

@ -607,6 +607,8 @@ hb_utf8_next (const uint8_t *text,
uint8_t c = *text;
unsigned int mask, len;
/* TODO check for overlong sequences? also: optimize? */
UTF8_COMPUTE (c, mask, len);
if (unlikely (!len || (unsigned int) (end - text) < len)) {
*unicode = -1;