Fix sign comparison error
authorBehdad Esfahbod <behdad@behdad.org>
Mon, 28 Jan 2019 19:12:41 +0000 (14:12 -0500)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 28 Jan 2019 19:12:41 +0000 (14:12 -0500)
src/hb-open-file.hh

index de22ed5..32a223c 100644 (file)
@@ -154,7 +154,8 @@ typedef struct OffsetTable
       c->align (4);
       const char *end = (const char *) c->head;
 
-      if (items[i].tag == HB_OT_TAG_head && end - start >= head::static_size)
+      if (items[i].tag == HB_OT_TAG_head &&
+         (unsigned) (end - start) >= head::static_size)
       {
        head *h = (head *) start;
        checksum_adjustment = &h->checkSumAdjustment;