Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Sep 25, 2023
1 parent 8ad8948 commit 72b3625
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/floaty/src/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ macro_rules! run_instr {
};
ret
}};
($instr:expr, $input1:expr, $input1_ty:ty, $input2:expr, $input2_ty:ty, $returnty:ty) => {{
($instr:expr, $input1:expr, $input1_ty:ty, $input2:expr, $input2_ty:ty, $return_ty:ty) => {{
let input1: $input1_ty = $input1;
let input2: $input2_ty = $input2;
let ret: $returnty;
let ret: $return_ty;
unsafe {
core::arch::asm!("local.get {0}", "local.get {1}", $instr, "local.set {2}", in(local) input1, in(local) input2, out(local) ret)
};
Expand Down
2 changes: 1 addition & 1 deletion packages/vm/src/calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ mod tests {
// this might throw a runtime error (e.g. if the instruction traps)
let result = match call_query(&mut instance, &mock_env(), msg.as_bytes()) {
Ok(ContractResult::Ok(r)) => format!("{:?}", from_json::<Value>(&r).unwrap()),
Err(VmError::RuntimeErr { msg }) => msg,
Err(VmError::RuntimeErr { msg, .. }) => msg,
e => panic!("unexpected error: {e:?}"),
};
// add the result to the hash
Expand Down

0 comments on commit 72b3625

Please sign in to comment.