Fix hb_buffer_set_length(buffer, 0)

Was causing invalid realloc()s.
This commit is contained in:
Behdad Esfahbod 2012-10-28 20:11:47 -07:00
parent b7115b63be
commit 38b015e57f
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ hb_buffer_t::enlarge (unsigned int size)
if (unlikely (_hb_unsigned_int_mul_overflows (size, sizeof (info[0]))))
goto done;
while (size > new_allocated)
while (size >= new_allocated)
new_allocated += (new_allocated >> 1) + 32;
ASSERT_STATIC (sizeof (info[0]) == sizeof (pos[0]));