codegen: truncate a boolean calldata down to one bit

This commit is contained in:
Yoichi Hirai committed 2016-11-30 17:41:38 +01:00
1 parent b16cdbb57e
commit 03ccc6df70
2 files changed
+3

No files matched your search

+2
View File
@@ -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;
}