Fix inert buffer set_length() with zero

Oops!
This commit is contained in:
Behdad Esfahbod 2012-06-05 20:31:49 -04:00
parent 04bc1eebe7
commit e1ac38f8dd
1 changed files with 3 additions and 0 deletions

View File

@ -694,6 +694,9 @@ hb_bool_t
hb_buffer_set_length (hb_buffer_t *buffer,
unsigned int length)
{
if (unlikely (hb_object_is_inert (buffer)))
return length == 0;
if (!buffer->ensure (length))
return FALSE;