Fix ICE in CHC when using gas in the function options

This commit is contained in:
Leo Alt
2021-11-03 15:40:54 +01:00
parent e40cf92b1d
commit dff280cadc
3 changed files with 12 additions and 2 deletions
+2 -2
View File
@@ -791,8 +791,8 @@ void CHC::externalFunctionCall(FunctionCall const& _funCall)
valueIndex = i;
break;
}
solAssert(valueIndex, "");
state().addBalance(state().thisAddress(), 0 - expr(*callOptions->options().at(*valueIndex)));
if (valueIndex)
state().addBalance(state().thisAddress(), 0 - expr(*callOptions->options().at(*valueIndex)));
}
auto preCallState = vector<smtutil::Expression>{state().state()} + currentStateVariables();