Skip to content

Commit 9dc097f

Browse files
committed
[libc] Fix |= between potential BigInt and bool
1 parent 74ec474 commit 9dc097f

File tree

1 file changed

+1
-1
lines changed
  • libc/src/__support/FPUtil/generic

1 file changed

+1
-1
lines changed

libc/src/__support/FPUtil/generic/sqrt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ sqrt(InType x) {
153153
y |= 1 << 1;
154154
}
155155
// Sticky bit.
156-
y |= r != 0;
156+
y |= static_cast<unsigned int>(r != 0);
157157

158158
DyadicFloat yd(Sign::POS, (x_exp >> 1) - 2 - InFPBits::FRACTION_LEN, y);
159159
return yd.template as<OutType, /*ShouldSignalExceptions=*/true>();

0 commit comments

Comments
 (0)