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

Commit d997a4f3 authored by Robert Shih's avatar Robert Shih Committed by android-build-merger
Browse files

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

am: 1bb5062a

* commit '1bb5062a':
  WebmWriter: avoid overflow when bit twiddling

Change-Id: I43fde8cfa974328402f57cef21283c30b02ed129
parents 8ffffec4 1bb5062a
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];
}