Serializer now writes floating point zero if special value is encountered

See https://forum.zdoom.org/viewtopic.php?t=54592
This commit is contained in:
alexey.lysiuk 2016-12-20 13:13:50 +02:00 committed by Christoph Oelckers
parent 2676ca1284
commit a0595f17e8

View file

@ -527,7 +527,9 @@ inline bool Writer<StringBuffer>::WriteDouble(double d) {
if (!(kWriteDefaultFlags & kWriteNanAndInfFlag))
{
// At least ensure that the output does not get broken.
PutReserve(*os_, 1);
PutReserve(*os_, 3);
PutUnsafe(*os_, '0');
PutUnsafe(*os_, '.');
PutUnsafe(*os_, '0');
return false;
}