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

Commit e860d239 authored by Colin Cross's avatar Colin Cross Committed by Android Git Automerger
Browse files

am 9c1c2059: am 5b3eb07e: Merge "Prevent bit shifting if num bits is negative"

* commit '9c1c2059':
  Prevent bit shifting if num bits is negative
parents 1875930a 9c1c2059
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ int32_t gglRecipQ(GGLfixed x, int q)
    int shift;
    x = gglRecipQNormalized(x, &shift);
    shift += 16-q;
    if (shift > 0)
        x += 1L << (shift-1);   // rounding
    x >>= shift;
    return x;