diff options
author | chriseth <chris@ethereum.org> | 2017-06-22 22:39:42 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-06-22 22:48:44 +0800 |
commit | f340ff87645a4b1026bbe7f95ad4f63a955a87a2 (patch) | |
tree | af8329cdf7e7a74e5f398f1a2fc0f3a9f4cc1c37 /libsolidity | |
parent | 9eaf26a35900eb6c26e098e3caa822038c0dc0fa (diff) | |
download | dexon-solidity-f340ff87645a4b1026bbe7f95ad4f63a955a87a2.tar dexon-solidity-f340ff87645a4b1026bbe7f95ad4f63a955a87a2.tar.gz dexon-solidity-f340ff87645a4b1026bbe7f95ad4f63a955a87a2.tar.bz2 dexon-solidity-f340ff87645a4b1026bbe7f95ad4f63a955a87a2.tar.lz dexon-solidity-f340ff87645a4b1026bbe7f95ad4f63a955a87a2.tar.xz dexon-solidity-f340ff87645a4b1026bbe7f95ad4f63a955a87a2.tar.zst dexon-solidity-f340ff87645a4b1026bbe7f95ad4f63a955a87a2.zip |
Fix strings interpreted as addresses.
Diffstat (limited to 'libsolidity')
-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; |