mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Use isnan
This commit is contained in:
parent
38316cdaf8
commit
c0f7e0d585
@ -52,7 +52,10 @@ void ESM::readESMVariantValue(ESMReader& esm, Variant::Format format, VarType ty
|
||||
esm.getHNT (value, "FLTV");
|
||||
|
||||
if (type==VT_Short)
|
||||
out = static_cast<short> (value);
|
||||
if (isnan(value))
|
||||
out = 0;
|
||||
else
|
||||
out = static_cast<short> (value);
|
||||
else if (type==VT_Long)
|
||||
out = static_cast<int> (value);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user