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
pull/90/head
Behdad Esfahbod 10 years ago
parent 7481bd49d5
commit 9e401f6890
  1. 2
      src/hb-buffer.cc

@ -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--) {

Loading…
Cancel
Save