[algs] Adjust return value of hb_ctz(0) to be 32 instead of 0

This commit is contained in:
Behdad Esfahbod 2019-12-07 22:35:34 -06:00
parent eefb78f674
commit 70aa5071d8
1 changed files with 1 additions and 1 deletions

View File

@ -486,7 +486,7 @@ template <typename T>
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))