Skip to content

Commit

Permalink
fix: returndata buffer emptied on stop
Browse files Browse the repository at this point in the history
  • Loading branch information
enitrat committed Sep 16, 2024
1 parent 9024471 commit 0429775
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 295 deletions.
4 changes: 3 additions & 1 deletion crates/evm/src/call_helpers.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ pub impl CallHelpersImpl of CallHelpers {
self.stack.push(0)?;
},
ExecutionResultStatus::Exception => {
// If the call has halted exceptionnaly, the return_data is emptied.
// If the call has halted exceptionnaly,
// the return_data is emptied, and nothing is stored in memory
self.return_data = [].span();
self.stack.push(0)?;
return Result::Ok(());
},
}

Expand Down
Loading

0 comments on commit 0429775

Please sign in to comment.