diff options
author | chriseth <chris@ethereum.org> | 2018-09-04 22:51:22 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-09-10 18:47:46 +0800 |
commit | 120438c0cf7abc506ca90221bafa2a9cbbb12994 (patch) | |
tree | c3ecf5e0ded7911f383a4f1e6c53a106c23099d8 /libsolidity/codegen | |
parent | 7118f5397485d42f38e66e98b163d7396e373a4e (diff) | |
download | dexon-solidity-120438c0cf7abc506ca90221bafa2a9cbbb12994.tar.gz dexon-solidity-120438c0cf7abc506ca90221bafa2a9cbbb12994.tar.zst dexon-solidity-120438c0cf7abc506ca90221bafa2a9cbbb12994.zip |
Always perform cleanup for EXP.
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 4150bc11..45e58bd0 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -2138,7 +2138,9 @@ bool ExpressionCompiler::cleanupNeededForOp(Type::Category _type, Token::Value _ { if (Token::isCompareOp(_op) || Token::isShiftOp(_op)) return true; - else if (_type == Type::Category::Integer && (_op == Token::Div || _op == Token::Mod)) + else if (_type == Type::Category::Integer && (_op == Token::Div || _op == Token::Mod || _op == Token::Exp)) + // We need cleanup for EXP because 0**0 == 1, but 0**0x100 == 0 + // It would suffice to clean the exponent, though. return true; else return false; |