Merge pull request #1218 from ethereum/null-integer-type

Add a null-pointer check
This commit is contained in:
chriseth 2016-10-14 11:51:08 +02:00 committed by GitHub
commit 1584c5992e

View File

@ -574,7 +574,11 @@ bool RationalNumberType::isImplicitlyConvertibleTo(Type const& _convertTo) const
{
FixedBytesType const& fixedBytes = dynamic_cast<FixedBytesType const&>(_convertTo);
if (!isFractional())
{
if (integerType())
return fixedBytes.numBytes() * 8 >= integerType()->numBits();
return false;
}
else
return false;
}