From d35315cc028e70dd1b3ffc8cb079a2336b22a0c3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 9 Oct 2018 23:17:32 -0400 Subject: [PATCH] [aat] Fixup recent commit For 329f2401082011007d9ce12b15ce0225cd267c57 max_ops is signed. --- src/hb-aat-layout-common.hh | 2 +- src/hb-machinery.hh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hb-aat-layout-common.hh b/src/hb-aat-layout-common.hh index 3d562e795..5845ab516 100644 --- a/src/hb-aat-layout-common.hh +++ b/src/hb-aat-layout-common.hh @@ -538,7 +538,7 @@ struct hb_aat_apply_context_t : sanitizer.init (table); sanitizer.set_num_glyphs (face->get_num_glyphs ()); sanitizer.start_processing (); - sanitizer.set_max_ops ((unsigned int) -1); + sanitizer.set_max_ops (HB_SANITIZE_MAX_OPS_MAX); } inline void set_lookup_index (unsigned int i) { lookup_index = i; } diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh index 98808894b..8feb3773c 100644 --- a/src/hb-machinery.hh +++ b/src/hb-machinery.hh @@ -217,6 +217,9 @@ struct hb_dispatch_context_t #ifndef HB_SANITIZE_MAX_OPS_MIN #define HB_SANITIZE_MAX_OPS_MIN 16384 #endif +#ifndef HB_SANITIZE_MAX_OPS_MAX +#define HB_SANITIZE_MAX_OPS_MAX 0x3FFFFFFF +#endif struct hb_sanitize_context_t : hb_dispatch_context_t @@ -252,7 +255,7 @@ struct hb_sanitize_context_t : } inline unsigned int get_num_glyphs (void) { return num_glyphs; } - inline void set_max_ops (unsigned int max_ops_) { max_ops = max_ops_; } + inline void set_max_ops (int max_ops_) { max_ops = max_ops_; } template inline void set_object (const T& obj)