diff options
author | chriseth <chris@ethereum.org> | 2016-10-14 17:51:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-14 17:51:08 +0800 |
commit | 1584c5992e05a4eb0b7a9335edd4e7b3e272c29b (patch) | |
tree | 5108c8e4c9a0f399cb9468f164dde79c501a9d74 | |
parent | 0635b6e008fc9eaa6e96d91101e420012db6bb83 (diff) | |
parent | 8e11bac8dee78f0133dd1a06644dc8b55123c58c (diff) | |
download | dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar.gz dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar.bz2 dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar.lz dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar.xz dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.tar.zst dexon-solidity-1584c5992e05a4eb0b7a9335edd4e7b3e272c29b.zip |
Merge pull request #1218 from ethereum/null-integer-type
Add a null-pointer check
-rw-r--r-- | libsolidity/ast/Types.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 6d1af534..edb0fbe4 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -574,7 +574,11 @@ bool RationalNumberType::isImplicitlyConvertibleTo(Type const& _convertTo) const { FixedBytesType const& fixedBytes = dynamic_cast<FixedBytesType const&>(_convertTo); if (!isFractional()) - return fixedBytes.numBytes() * 8 >= integerType()->numBits(); + { + if (integerType()) + return fixedBytes.numBytes() * 8 >= integerType()->numBits(); + return false; + } else return false; } |