mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Do not try parsing hex numbers as scientific notation
This commit is contained in:
parent
dfc8f890bf
commit
07045d492f
@ -32,6 +32,7 @@
|
||||
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
#include <boost/range/adaptor/sliced.hpp>
|
||||
#include <boost/range/adaptor/transformed.hpp>
|
||||
@ -581,7 +582,7 @@ tuple<bool, rational> RationalNumberType::isValidLiteral(Literal const& _literal
|
||||
expPoint = find(_literal.value().begin(), _literal.value().end(), 'E');
|
||||
auto radixPoint = find(_literal.value().begin(), _literal.value().end(), '.');
|
||||
|
||||
if (expPoint != _literal.value().end())
|
||||
if (!boost::starts_with(_literal.value(), "0x") && (expPoint != _literal.value().end()))
|
||||
{
|
||||
if (
|
||||
!all_of(_literal.value().begin(), expPoint, ::isdigit)
|
||||
|
Loading…
Reference in New Issue
Block a user