projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5da3c9c
)
[enumerate] Fix hb_enumerate() len for step=0
author
Behdad Esfahbod
<behdad@behdad.org>
Thu, 9 May 2019 19:07:45 +0000
(12:07 -0700)
committer
Behdad Esfahbod
<behdad@behdad.org>
Thu, 9 May 2019 19:07:45 +0000
(12:07 -0700)
src/hb-iter.hh
patch
|
blob
|
history
diff --git
a/src/hb-iter.hh
b/src/hb-iter.hh
index
7503312
..
13b8260
100644
(file)
--- a/
src/hb-iter.hh
+++ b/
src/hb-iter.hh
@@
-539,7
+539,7
@@
struct hb_counter_iter_t :
__item_t__ __item__ () const { return +v; }
__item_t__ __item_at__ (unsigned j) const { return v + j * step; }
bool __more__ () const { return v != end_; }
- unsigned __len__ () const { return (end_ - v) / step; }
+ unsigned __len__ () const { return
!step ? UINT_MAX :
(end_ - v) / step; }
void __next__ () { v += step; }
void __forward__ (unsigned n) { v += n * step; }
void __prev__ () { v -= step; }