[subset] Fix integer underflow in ContextFormat2.
diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh
index 03a578c..cb62b02 100644
--- a/src/hb-ot-layout-gsubgpos.hh
+++ b/src/hb-ot-layout-gsubgpos.hh
@@ -1859,7 +1859,7 @@
 
     const hb_map_t *lookup_map = c->table_tag == HB_OT_TAG_GSUB ? c->plan->gsub_lookups : c->plan->gpos_lookups;
     bool ret = true;
-    unsigned non_zero_index = 0, index = 0;
+    int non_zero_index = 0, index = 0;
     for (const hb_pair_t<unsigned, const OffsetTo<RuleSet>&> _ : + hb_enumerate (ruleSet)
 								 | hb_filter (klass_map, hb_first))
     {