Do not check gas cost of value 0

[Delivers #80544260]
This commit is contained in:
Paweł Bylica 2014-10-13 16:33:51 +02:00
parent efe23ad7b8
commit 8a522834f0

View file

@ -112,7 +112,11 @@ void GasMeter::commitCostBlock()
// If any uncommited block
if (m_checkCall)
{
m_checkCall->setArgOperand(0, m_builder.getIntN(256, m_blockCost)); // Update block cost in gas check call
if (m_blockCost > 0) // If any cost
m_checkCall->setArgOperand(0, m_builder.getIntN(256, m_blockCost)); // Update block cost in gas check call
else
m_checkCall->eraseFromParent(); // Remove the gas check call
m_checkCall = nullptr; // End cost-block
m_blockCost = 0;
}