diff options
author | Christian <c@ethdev.com> | 2014-12-11 21:19:11 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-11 21:19:11 +0800 |
commit | a7352280790f1b88048b4879c46748d2082b1325 (patch) | |
tree | aaf4f0a40e18abbd8264305e714a1bd50ac3e9d7 /Compiler.cpp | |
parent | 8b54d1afb2b3ad897330258367b2ce67c8a56940 (diff) | |
download | dexon-solidity-a7352280790f1b88048b4879c46748d2082b1325.tar.gz dexon-solidity-a7352280790f1b88048b4879c46748d2082b1325.tar.zst dexon-solidity-a7352280790f1b88048b4879c46748d2082b1325.zip |
Support empty strings.
Diffstat (limited to 'Compiler.cpp')
-rw-r--r-- | Compiler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Compiler.cpp b/Compiler.cpp index 940a5e70..92d574fb 100644 --- a/Compiler.cpp +++ b/Compiler.cpp @@ -135,7 +135,7 @@ unsigned Compiler::appendCalldataUnpacker(FunctionDefinition const& _function, b for (ASTPointer<VariableDeclaration> const& var: _function.getParameters()) { unsigned const numBytes = var->getType()->getCalldataEncodedSize(); - if (numBytes == 0 || numBytes > 32) + if (numBytes > 32) BOOST_THROW_EXCEPTION(CompilerError() << errinfo_sourceLocation(var->getLocation()) << errinfo_comment("Type " + var->getType()->toString() + " not yet supported.")); @@ -156,7 +156,7 @@ void Compiler::appendReturnValuePacker(FunctionDefinition const& _function) { Type const& paramType = *parameters[i]->getType(); unsigned numBytes = paramType.getCalldataEncodedSize(); - if (numBytes == 0 || numBytes > 32) + if (numBytes > 32) BOOST_THROW_EXCEPTION(CompilerError() << errinfo_sourceLocation(parameters[i]->getLocation()) << errinfo_comment("Type " + paramType.toString() + " not yet supported.")); |