From 24fe2be9c11023f4eeec83392866950bf46a45f8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 6 Feb 2025 11:55:23 +0000 Subject: [PATCH] [subset] Fix undefined-behavior --- src/hb-ot-layout-common.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 593b51b9f..36855365b 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -3900,8 +3900,8 @@ struct ConditionAxisRange { // add axisIndex->value into the hashmap so we can check if the record is // unique with variations - int16_t int_filter_max_val = filterRangeMaxValue.to_int (); - int16_t int_filter_min_val = filterRangeMinValue.to_int (); + uint16_t int_filter_max_val = (uint16_t) filterRangeMaxValue.to_int (); + uint16_t int_filter_min_val = (uint16_t) filterRangeMinValue.to_int (); hb_codepoint_t val = (int_filter_max_val << 16) + int_filter_min_val; condition_map->set (axisIndex, val);