[iter] Fix hb_zip() end condition

We should compare-equal to end if either iterator's end reaches,
not if both reach at the same time.  Fixes infinite-loop in test
which was happening after hb_enumerate() switched to using hb_zip().
This commit is contained in:
Behdad Esfahbod 2019-05-09 11:30:31 -07:00
parent 57a5256fbc
commit 5da3c9c33f
1 changed files with 1 additions and 1 deletions

View File

@ -479,7 +479,7 @@ struct hb_zip_iter_t :
void __rewind__ (unsigned n) { a -= n; b -= n; }
hb_zip_iter_t __end__ () const { return hb_zip_iter_t (a.end (), b.end ()); }
bool operator != (const hb_zip_iter_t& o) const
{ return a != o.a || b != o.b; }
{ return a != o.a && b != o.b; }
private:
A a;