mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- fixed a second spot in RapidJSON where a bad NaN check was done.
This commit is contained in:
parent
9ef551b84a
commit
7ca5851f78
1 changed files with 7 additions and 2 deletions
|
@ -525,7 +525,12 @@ inline bool Writer<StringBuffer>::WriteDouble(double d) {
|
|||
if (internal::Double(d).IsNanOrInf()) {
|
||||
// Note: This code path can only be reached if (RAPIDJSON_WRITE_DEFAULT_FLAGS & kWriteNanAndInfFlag).
|
||||
if (!(kWriteDefaultFlags & kWriteNanAndInfFlag))
|
||||
{
|
||||
// At least ensure that the output does not get broken.
|
||||
PutReserve(*os_, 1);
|
||||
PutUnsafe(*os_, '0');
|
||||
return false;
|
||||
}
|
||||
if (internal::Double(d).IsNan()) {
|
||||
PutReserve(*os_, 3);
|
||||
PutUnsafe(*os_, 'N'); PutUnsafe(*os_, 'a'); PutUnsafe(*os_, 'N');
|
||||
|
|
Loading…
Reference in a new issue