Skip to content

Commit

Permalink
[libc][Obvious] Fix nextafter* implementation.
Browse files Browse the repository at this point in the history
It broke when FPBits was converted to a union.
  • Loading branch information
Siva Chandra Reddy committed Apr 13, 2021
1 parent a285bdb commit 31ed45d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libc/utils/FPUtil/ManipulationFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static inline T nextafter(T from, T to) {
--intVal;
}
} else {
intVal = (UIntType(toBits) & signMask) + UIntType(1);
intVal = (toBits.uintval() & signMask) + UIntType(1);
}

return *reinterpret_cast<T *>(&intVal);
Expand Down

0 comments on commit 31ed45d

Please sign in to comment.