aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-04-30 19:23:30 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-04-30 19:23:30 +0800
commite0b178e1c51fad4c405e79e1661a6e4692f17ee8 (patch)
tree9a54f22858393401c116f35d6329df2dd31f428a
parent1604a996fe03561b56209778f1e510a9a720c5f1 (diff)
downloaddexon-solidity-e0b178e1c51fad4c405e79e1661a6e4692f17ee8.tar
dexon-solidity-e0b178e1c51fad4c405e79e1661a6e4692f17ee8.tar.gz
dexon-solidity-e0b178e1c51fad4c405e79e1661a6e4692f17ee8.tar.bz2
dexon-solidity-e0b178e1c51fad4c405e79e1661a6e4692f17ee8.tar.lz
dexon-solidity-e0b178e1c51fad4c405e79e1661a6e4692f17ee8.tar.xz
dexon-solidity-e0b178e1c51fad4c405e79e1661a6e4692f17ee8.tar.zst
dexon-solidity-e0b178e1c51fad4c405e79e1661a6e4692f17ee8.zip
Disable FixedBytesType(0) aka bytes0
-rw-r--r--libsolidity/ast/Types.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 425e5045..63724ca0 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -1283,8 +1283,10 @@ shared_ptr<FixedBytesType> FixedBytesType::smallestTypeForLiteral(string const&
FixedBytesType::FixedBytesType(int _bytes): m_bytes(_bytes)
{
- solAssert(m_bytes >= 0 && m_bytes <= 32,
- "Invalid byte number for fixed bytes type: " + dev::toString(m_bytes));
+ solAssert(
+ m_bytes > 0 && m_bytes <= 32,
+ "Invalid byte number for fixed bytes type: " + dev::toString(m_bytes)
+ );
}
bool FixedBytesType::isImplicitlyConvertibleTo(Type const& _convertTo) const