aboutsummaryrefslogtreecommitdiffstats
path: root/Types.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-06-10 21:35:28 +0800
committerchriseth <c@ethdev.com>2015-06-10 21:35:28 +0800
commit6ad90719d8f34e093a1c3e57b60b79b31a0332f3 (patch)
tree1ce93a9993c04b7f56e3244e875d0583bd7272be /Types.cpp
parent3588709e4e89de0ad5428a28209f699100e8ebc3 (diff)
parent05d36074d17832060b073b2f9920c0918b0987d8 (diff)
downloaddexon-solidity-6ad90719d8f34e093a1c3e57b60b79b31a0332f3.tar.gz
dexon-solidity-6ad90719d8f34e093a1c3e57b60b79b31a0332f3.tar.zst
dexon-solidity-6ad90719d8f34e093a1c3e57b60b79b31a0332f3.zip
Merge pull request #2114 from LianaHus/sol_byte0_in_storage
Sol removed bytes0
Diffstat (limited to 'Types.cpp')
-rw-r--r--Types.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Types.cpp b/Types.cpp
index e1161c3f..6f16f519 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -121,7 +121,7 @@ TypePointer Type::fromElementaryTypeName(Token::Value _typeToken)
{
int offset = _typeToken - Token::Int;
int bytes = offset % 33;
- if (bytes == 0 && _typeToken != Token::Bytes0)
+ if (bytes == 0 && _typeToken != Token::Bytes1)
bytes = 32;
int modifier = offset / 33;
switch(modifier)
@@ -131,7 +131,7 @@ TypePointer Type::fromElementaryTypeName(Token::Value _typeToken)
case 1:
return make_shared<IntegerType>(bytes * 8, IntegerType::Modifier::Unsigned);
case 2:
- return make_shared<FixedBytesType>(bytes);
+ return make_shared<FixedBytesType>(bytes + 1);
default:
solAssert(false, "Unexpected modifier value. Should never happen");
return TypePointer();