提交 931f8b7e 编写于 作者: B Behdad Esfahbod

Fix another thinko

上级 39b86695
......@@ -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);
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册