aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-06-23 05:33:06 +0800
committerGitHub <noreply@github.com>2017-06-23 05:33:06 +0800
commit79ed529b3fc9fb03460ad3c8e6f1cb05434358b4 (patch)
tree9b42cc52e5861c13f6759587c875e5142def4d25 /libsolidity
parent08a5d144ace9392b31a33fd2f051feb7777b93be (diff)
parent7ec9b70457fb8f7eb457aa7a0199ce099c08824c (diff)
downloaddexon-solidity-79ed529b3fc9fb03460ad3c8e6f1cb05434358b4.tar.gz
dexon-solidity-79ed529b3fc9fb03460ad3c8e6f1cb05434358b4.tar.zst
dexon-solidity-79ed529b3fc9fb03460ad3c8e6f1cb05434358b4.zip
Merge pull request #2452 from ethereum/fixPassingEmptyString
Fix passing empty string
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/codegen/CompilerUtils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp
index 3baaaddf..bfe72961 100644
--- a/libsolidity/codegen/CompilerUtils.cpp
+++ b/libsolidity/codegen/CompilerUtils.cpp
@@ -128,7 +128,7 @@ void CompilerUtils::storeInMemoryDynamic(Type const& _type, bool _padToWordBound
m_context << Instruction::DUP1;
storeStringData(bytesConstRef(str->value()));
if (_padToWordBoundaries)
- m_context << u256(((str->value().size() + 31) / 32) * 32);
+ m_context << u256(max<size_t>(32, ((str->value().size() + 31) / 32) * 32));
else
m_context << u256(str->value().size());
m_context << Instruction::ADD;