This commit is contained in:
Behdad Esfahbod 2012-06-08 20:56:05 -04:00
parent e88e14421a
commit fe3dabc08d
1 changed files with 2 additions and 2 deletions

View File

@ -416,7 +416,7 @@ void
hb_buffer_t::merge_clusters (unsigned int start, hb_buffer_t::merge_clusters (unsigned int start,
unsigned int end) unsigned int end)
{ {
if (unlikely (start >= end)) if (unlikely (end - start < 2))
return; return;
unsigned int cluster = info[start].cluster; unsigned int cluster = info[start].cluster;
@ -444,7 +444,7 @@ void
hb_buffer_t::merge_out_clusters (unsigned int start, hb_buffer_t::merge_out_clusters (unsigned int start,
unsigned int end) unsigned int end)
{ {
if (unlikely (start >= end)) if (unlikely (end - start < 2))
return; return;
unsigned int cluster = out_info[start].cluster; unsigned int cluster = out_info[start].cluster;