mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 03:45:35 +00:00
Use isnan
This commit is contained in:
parent
38316cdaf8
commit
c0f7e0d585
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue