Leave one extra item at the end of buffer allocation

Just in case, for the times we do out-of-bounds access.

jk
This commit is contained in:
Behdad Esfahbod 2012-07-18 15:43:55 -04:00
parent 075d671f10
commit d16ccc4ae7
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ struct hb_buffer_t {
HB_INTERNAL bool enlarge (unsigned int size);
inline bool ensure (unsigned int size)
{ return likely (size <= allocated) ? true : enlarge (size); }
{ return likely (size < allocated) ? true : enlarge (size); }
HB_INTERNAL bool make_room_for (unsigned int num_in, unsigned int num_out);