Fix "comparison between signed and unsigned" warnings

Patch from Jonathan Kew.
This commit is contained in:
Behdad Esfahbod 2013-02-25 23:57:51 -05:00
parent 07a52b6211
commit 05d5d3cd63
1 changed files with 1 additions and 1 deletions

View File

@ -411,7 +411,7 @@ struct hb_serialize_context_t
template <typename Type>
inline Type *allocate_size (unsigned int size)
{
if (unlikely (this->ran_out_of_room || this->end - this->head < size)) {
if (unlikely (this->ran_out_of_room || this->end - this->head < ptrdiff_t (size))) {
this->ran_out_of_room = true;
return NULL;
}