diff options
-rw-r--r-- | Changelog.md | 1 | ||||
-rw-r--r-- | libsolidity/codegen/CompilerUtils.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/Changelog.md b/Changelog.md index b5e48173..86e0125a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,6 +5,7 @@ Features: Bugfixes: * Type checker: string literals that are not valid UTF-8 cannot be converted to string type + * Code generator: higher bits in a boolean argument are ignored. ### 0.4.6 (2016-11-22) diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp index d5361ac6..ff0f8b9c 100644 --- a/libsolidity/codegen/CompilerUtils.cpp +++ b/libsolidity/codegen/CompilerUtils.cpp @@ -925,6 +925,8 @@ unsigned CompilerUtils::loadFromMemoryHelper(Type const& _type, bool _fromCallda if (leftAligned) m_context << shiftFactor << Instruction::MUL; } + if (_fromCalldata && _type.category() == Type::Category::Bool) + m_context << Instruction::ISZERO << Instruction::ISZERO; return numBytes; } |