mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
codegen: truncate a boolean calldata down to one bit
This commit is contained in:
parent
b16cdbb57e
commit
03ccc6df70
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user