mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
LibJS: Don't try to store negative zero as an Int32 JS::Value
This commit is contained in:
parent
6870349599
commit
14d598fe7f
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ public:
|
|||
|
||||
explicit Value(double value)
|
||||
{
|
||||
if (value >= NumericLimits<i32>::min() && value <= NumericLimits<i32>::max() && static_cast<i32>(value) == value) {
|
||||
if (value >= NumericLimits<i32>::min() && value <= NumericLimits<i32>::max() && trunc(value) == value && value != -0.0) {
|
||||
m_type = Type::Int32;
|
||||
m_value.as_i32 = static_cast<i32>(value);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue