diff options
-rw-r--r-- | libsolidity/ast/AST.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index 40dfa348..b929b6fe 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -534,6 +534,8 @@ bool Literal::looksLikeAddress() const { if (subDenomination() != SubDenomination::None) return false; + if (token() != Token::Number) + return false; string lit = value(); return lit.substr(0, 2) == "0x" && abs(int(lit.length()) - 42) <= 1; |