diff options
author | daniel <danieljoonlee@gmail.com> | 2018-05-01 13:58:04 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-04 06:11:34 +0800 |
commit | aa1542a9e12177311e7d426b7606823ae45ee88e (patch) | |
tree | 1f5775b95f3bcc3a4d05d01e5ab8a2d2ffd91cc2 /libsolidity/codegen | |
parent | b34428249a24c29e17de8636c2d3011d95d052cc (diff) | |
download | dexon-solidity-aa1542a9e12177311e7d426b7606823ae45ee88e.tar dexon-solidity-aa1542a9e12177311e7d426b7606823ae45ee88e.tar.gz dexon-solidity-aa1542a9e12177311e7d426b7606823ae45ee88e.tar.bz2 dexon-solidity-aa1542a9e12177311e7d426b7606823ae45ee88e.tar.lz dexon-solidity-aa1542a9e12177311e7d426b7606823ae45ee88e.tar.xz dexon-solidity-aa1542a9e12177311e7d426b7606823ae45ee88e.tar.zst dexon-solidity-aa1542a9e12177311e7d426b7606823ae45ee88e.zip |
Change bytes to unsigned in FixedBytesType
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r-- | libsolidity/codegen/CompilerUtils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp index 48b77eb3..fc1ff0eb 100644 --- a/libsolidity/codegen/CompilerUtils.cpp +++ b/libsolidity/codegen/CompilerUtils.cpp @@ -688,7 +688,7 @@ void CompilerUtils::convertType( m_context << Instruction::POP << u256(0); else if (targetType.numBytes() > typeOnStack.numBytes() || _cleanupNeeded) { - int bytes = min(typeOnStack.numBytes(), targetType.numBytes()); + unsigned bytes = min(typeOnStack.numBytes(), targetType.numBytes()); m_context << ((u256(1) << (256 - bytes * 8)) - 1); m_context << Instruction::NOT << Instruction::AND; } @@ -796,7 +796,7 @@ void CompilerUtils::convertType( bytesConstRef data(value); if (targetTypeCategory == Type::Category::FixedBytes) { - int const numBytes = dynamic_cast<FixedBytesType const&>(_targetType).numBytes(); + unsigned const numBytes = dynamic_cast<FixedBytesType const&>(_targetType).numBytes(); solAssert(data.size() <= 32, ""); m_context << (h256::Arith(h256(data, h256::AlignLeft)) & (~(u256(-1) >> (8 * numBytes)))); } |