From 6dd80faf0dcb3e8a8915c3a25da44e2a67cb0cd8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 4 Apr 2016 14:34:25 -0700 Subject: [PATCH] Fix FixedVersion::to_int() Ouch. Had broken it in 9a13ed453ef96822a47d6e6f58332b87f38d5c59 Fixes https://github.com/behdad/harfbuzz/issues/238 Will add test soon. --- src/hb-open-type-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 0754ef0ef..80ad68774 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -751,7 +751,7 @@ struct CheckSum : ULONG template struct FixedVersion { - inline uint32_t to_int (void) const { return (major << sizeof(FixedType)) + minor; } + inline uint32_t to_int (void) const { return (major << (sizeof(FixedType) * 8)) + minor; } inline bool sanitize (hb_sanitize_context_t *c) const {