[aat] Fixup recent commit
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 10 Oct 2018 03:17:32 +0000 (23:17 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 10 Oct 2018 03:17:32 +0000 (23:17 -0400)
For 329f2401082011007d9ce12b15ce0225cd267c57

max_ops is signed.

src/hb-aat-layout-common.hh
src/hb-machinery.hh

index 3d562e7..5845ab5 100644 (file)
@@ -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; }
index 9880889..8feb377 100644 (file)
@@ -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<hb_sanitize_context_t, bool, HB_DEBUG_SANITIZE>
@@ -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 <typename T>
   inline void set_object (const T& obj)