Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bb5062a authored by Robert Shih's avatar Robert Shih Committed by Android (Google) Code Review
Browse files

Merge "WebmWriter: avoid overflow when bit twiddling" into nyc-dev

parents fbe7fcfe 7797ca07
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -29,7 +29,9 @@ int NTZ_TABLE[] = {
};

int numberOfTrailingZeros32(int32_t i) {
    uint32_t u = (i & -i) * 0x0450FBAF;
    int64_t i64 = i;
    i64 = (i64 & -i64) * 0x0450FBAF;
    uint32_t u = i64;
    return NTZ_TABLE[(u) >> 26];
}