提交 0f3e5119 编写于 作者: A Andrew Scheidecker 提交者: Matt Witherspoon

Round 32-bit decimal float literals before checking their range

上级 3038cf36
......@@ -168,7 +168,7 @@ Float parseDecimalFloat(const char*& nextChar,ParseState& state)
++nextChar;
Errors::fatalf("strtod failed to parse number accepted by lexer");
}
if(f64 < std::numeric_limits<Float>::lowest() || f64 > std::numeric_limits<Float>::max())
if(Float(f64) < std::numeric_limits<Float>::lowest() || Float(f64) > std::numeric_limits<Float>::max())
{
parseErrorf(state,firstChar,"float literal is too large");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册