summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2019-10-03 12:23:37 +0000
committerTavmjong Bah <tavmjong@free.fr>2019-10-03 12:23:37 +0000
commit573ad5a1fc6195119c159c127b66cd64d98d4019 (patch)
treec9727b6aad407a7a4569017fac4c2b7dba46724d /src/libnrtype
parentAdd support for extended Unicode planes in Unicode (Glyphs) dialog (includes ... (diff)
downloadinkscape-573ad5a1fc6195119c159c127b66cd64d98d4019.tar.gz
inkscape-573ad5a1fc6195119c159c127b66cd64d98d4019.zip
Fix comparison between char and value outside range for char in check for gzipped data.
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/OpenTypeUtil.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libnrtype/OpenTypeUtil.cpp b/src/libnrtype/OpenTypeUtil.cpp
index f17cc06cd..6380242b7 100644
--- a/src/libnrtype/OpenTypeUtil.cpp
+++ b/src/libnrtype/OpenTypeUtil.cpp
@@ -382,7 +382,8 @@ void readOpenTypeSVGTable(const FT_Face ft_face,
std::string svg;
- if (lengthGlyph > 1 && data[offsetGlyph] == 0x1f && data[offsetGlyph + 1] == 0x8b) {
+ // static cast is needed as hb_blob_get_length returns char but we are comparing to a value greater than allowed by char.
+ if (lengthGlyph > 1 && data[offsetGlyph] == 0x1f && static_cast<unsigned char>(data[offsetGlyph + 1]) == 0x8b) {
// Glyph is gzipped
std::vector<unsigned char> buffer;