Skip to content

Commit 31ed45d

Browse files
author
Siva Chandra Reddy
committed
[libc][Obvious] Fix nextafter* implementation.
It broke when FPBits was converted to a union.
1 parent a285bdb commit 31ed45d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/utils/FPUtil/ManipulationFunctions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static inline T nextafter(T from, T to) {
167167
--intVal;
168168
}
169169
} else {
170-
intVal = (UIntType(toBits) & signMask) + UIntType(1);
170+
intVal = (toBits.uintval() & signMask) + UIntType(1);
171171
}
172172

173173
return *reinterpret_cast<T *>(&intVal);

0 commit comments

Comments
 (0)