We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 377571c commit a154075Copy full SHA for a154075
src/scripting/stack.cpp
@@ -168,8 +168,10 @@ std::any DeserializeData(EValue ref, EContext* state)
168
return ref.cast<bool>();
169
else if (ref.isNull())
170
return nullptr;
171
- else if (ref.isNumber())
172
- return ref.cast<int64_t>();
+ else if (ref.isNumber()) {
+ if (ref.cast<float>() == (float)(ref.cast<int64_t>())) return ref.cast<float>();
173
+ else return ref.cast<int64_t>();
174
+ }
175
else if (ref.isString())
176
return ref.cast<std::string>();
177
else if (ref.isInstance<ClassData*>())
0 commit comments