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

Commit 37328ac2 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

am: d997a4f3

* commit 'd997a4f3':
  WebmWriter: avoid overflow when bit twiddling

Change-Id: I2ee7cb219d07d11fce247d44e4dd0cf2d10dd82d
parents 15e6f842 d997a4f3
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];
}