Use isnan

pull/3072/head
jvoisin 4 years ago
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…
Cancel
Save