commit | 70aa5071d89dbba792c4c9fb4df7ca716304656a | [log] [tgz] |
---|---|---|
author | Behdad Esfahbod <[email protected]> | Sat Dec 07 22:35:34 2019 -0600 |
committer | Behdad Esfahbod <[email protected]> | Mon Dec 09 17:48:10 2019 -0600 |
tree | 7357f0938eedbc200a9b634f18d41c225b3aba4a | |
parent | eefb78f674c9a71aaaca45cc1246584848622923 [diff] |
[algs] Adjust return value of hb_ctz(0) to be 32 instead of 0
diff --git a/src/hb-algs.hh b/src/hb-algs.hh index edafeab..d6f643d 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh
@@ -486,7 +486,7 @@ static inline HB_CONST_FUNC unsigned int hb_ctz (T v) { - if (unlikely (!v)) return 0; + if (unlikely (!v)) return 8 * sizeof (T); #if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) if (sizeof (T) <= sizeof (unsigned int))