aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsolidity/ast/Types.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 39760353..f1b47ebe 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -595,10 +595,13 @@ tuple<bool, rational> RationalNumberType::isValidLiteral(Literal const& _literal
x = bigint(string(_literal.value().begin(), expPoint));
if (exp < 0)
+ {
+ exp *= -1;
x /= boost::multiprecision::pow(
bigint(10),
- abs(exp).convert_to<int32_t>()
+ exp.convert_to<int32_t>()
);
+ }
else
x *= boost::multiprecision::pow(
bigint(10),