Fix another thinko

This commit is contained in:
Behdad Esfahbod 2018-02-07 21:42:03 -06:00
parent 39b86695cf
commit 931f8b7eb5
2 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ typedef struct OffsetTable
rec.checkSum.set_for_data (hb_blob_get_data (blob, nullptr), rec.length);
rec.offset.serialize (c, this);
void *p = c->allocate_size<void> (rec.length);
if (unlikely (!p)) return false;
if (unlikely (!p)) {return false;}
memcpy (p, hb_blob_get_data (blob, nullptr), rec.length);
if (rec.length % 4)
p = c->allocate_size<void> (4 - rec.length % 4);

View File

@ -383,7 +383,7 @@ _hb_unsigned_int_mul_overflows (unsigned int count, unsigned int size)
static inline unsigned int
_hb_ceil_to_4 (unsigned int v)
{
return ((v - 1) & 3) + 1;
return ((v - 1) | 3) + 1;
}