diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh index 631723998..c2e1f7de3 100644 --- a/src/hb-open-file-private.hh +++ b/src/hb-open-file-private.hh @@ -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 (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 (4 - rec.length % 4); diff --git a/src/hb-private.hh b/src/hb-private.hh index 118f2924b..59d732afc 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -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; }