From f9cee08edd32182044407bf6ffde00df0feb09b7 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Tue, 4 Dec 2018 23:58:26 -0800 Subject: [PATCH] use sized int types in parse_bcd --- src/hb-cff-interp-dict-common.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hb-cff-interp-dict-common.hh b/src/hb-cff-interp-dict-common.hh index 0ffd4cecc..d5376e842 100644 --- a/src/hb-cff-interp-dict-common.hh +++ b/src/hb-cff-interp-dict-common.hh @@ -108,19 +108,19 @@ struct DictOpSet : OpSet { bool neg = false; double int_part = 0; - long frac_part = 0; - unsigned int frac_count = 0; + int64_t frac_part = 0; + uint32_t frac_count = 0; bool exp_neg = false; - unsigned int exp_part = 0; + uint32_t exp_part = 0; bool exp_overflow = false; enum Part { INT_PART=0, FRAC_PART, EXP_PART } part = INT_PART; enum Nibble { DECIMAL=10, EXP_POS, EXP_NEG, RESERVED, NEG, END }; - const unsigned long MAX_FRACT = 0xFFFFFFFFFFFFFlu; /* 1^52-1 */ - const unsigned int MAX_EXP = 0x7FFu; /* 1^11-1 */ + const uint64_t MAX_FRACT = 0xFFFFFFFFFFFFFlu; /* 1^52-1 */ + const uint32_t MAX_EXP = 0x7FFu; /* 1^11-1 */ double value = 0.0; unsigned char byte = 0; - for (unsigned int i = 0;; i++) + for (uint32_t i = 0;; i++) { char d; if ((i & 1) == 0)