summaryrefslogtreecommitdiff
path: root/src/fcfreetype.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2018-01-09 10:54:55 +0100
committerBehdad Esfahbod <behdad@behdad.org>2018-01-09 11:03:31 +0100
commitfd2ad1147ad9565841372e56e6bb939c0f843ac5 (patch)
tree2435e160b1037b7b2c3779694dc33bf064bfd043 /src/fcfreetype.c
parent7ac6af665ba3e098a097cab869e814bdbe34952d (diff)
downloadfontconfig-fd2ad1147ad9565841372e56e6bb939c0f843ac5.tar.gz
Fix undefined-behavior signed shifts
Diffstat (limited to 'src/fcfreetype.c')
-rw-r--r--src/fcfreetype.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 4d076b7..49fb39f 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1670,7 +1670,7 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
bits = os2->ulCodePageRange2;
bit = FcCodePageRange[i].bit - 32;
}
- if (bits & (1 << bit))
+ if (bits & (1U << bit))
{
/*
* If the font advertises support for multiple
@@ -2378,7 +2378,7 @@ FcFreeTypeCharSet (FT_Face face, FcBlanks *blanks FC_UNUSED)
goto bail;
}
off = ucs4 & 0xff;
- leaf->map[off >> 5] |= (1 << (off & 0x1f));
+ leaf->map[off >> 5] |= (1U << (off & 0x1f));
}
ucs4 = FT_Get_Next_Char (face, ucs4, &glyph);