Fix some recent Coverity findings

This commit is contained in:
Tim Wojtulewicz 2025-09-30 15:57:17 -07:00
parent 8b4707a284
commit 66f9695927
4 changed files with 4 additions and 4 deletions

View file

@ -574,7 +574,7 @@ void ScriptFunc::ReplaceBody(const StmtPtr& old_body, StmtPtr new_body) {
if ( new_body )
body->stmts = new_body;
else
bodies.erase(body);
body = bodies.erase(body);
found_it = true;
current_body = *body;