[iter] Allow negative step in hb_iota()
diff --git a/src/hb-iter.hh b/src/hb-iter.hh
index 1f3c819..a998125 100644
--- a/src/hb-iter.hh
+++ b/src/hb-iter.hh
@@ -567,7 +567,7 @@
{
template <typename T = unsigned, typename S = unsigned> hb_counter_iter_t<T, S>
operator () (T start = 0u, S&& step = 1u) const
- { return hb_counter_iter_t<T, S> (start, hb_int_max (T), step); }
+ { return hb_counter_iter_t<T, S> (start, step >= 0 ? hb_int_max (T) : hb_int_min (T), step); }
}
HB_FUNCOBJ (hb_iota);
struct