From 931f8b7eb5e740ce81e5be6bfec60dbe3ac7ebc4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 7 Feb 2018 21:42:03 -0600 Subject: [PATCH] Fix another thinko --- src/hb-open-file-private.hh | 2 +- src/hb-private.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }