Fix reverse_range() for empty range

Fixes coretext notdef loop consisting of all default_ignorable glyphs

https://code.google.com/p/chromium/issues/detail?id=464755
This commit is contained in:
Behdad Esfahbod 2015-03-20 16:08:38 -04:00
parent 7481bd49d5
commit 9e401f6890
1 changed files with 1 additions and 1 deletions

View File

@ -443,7 +443,7 @@ hb_buffer_t::reverse_range (unsigned int start,
{
unsigned int i, j;
if (start == end - 1)
if (end - start < 2)
return;
for (i = start, j = end - 1; i < j; i++, j--) {