From 6420ffe00fc4f4c6ffa63b80d961f70bc36c2caf Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Mon, 15 Oct 2018 14:03:18 -0700 Subject: [PATCH] fixed type casting bug --- src/hb-cff-interp-common.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-cff-interp-common.hh b/src/hb-cff-interp-common.hh index 9b7ccf06a..167bd7a7e 100644 --- a/src/hb-cff-interp-common.hh +++ b/src/hb-cff-interp-common.hh @@ -692,7 +692,7 @@ struct InterpEnv inline OpCode fetch_op (void) { - OpCode op = OpCode_Reserved2; + OpCode op = OpCode_Invalid; if (unlikely (!substr.avail ())) return OpCode_Invalid; op = (OpCode)(unsigned char)substr[0]; @@ -742,7 +742,7 @@ struct OpSet { switch (op) { case OpCode_shortint: - env.argStack.push_int ((env.substr[0] << 8) | env.substr[1]); + env.argStack.push_int ((int16_t)((env.substr[0] << 8) | env.substr[1])); env.substr.inc (2); break;