fix some bugs

This commit is contained in:
vms 2020-07-27 23:30:46 +03:00
parent c0d2d9fab1
commit dddfbdc31c
2 changed files with 3 additions and 1 deletions

View File

@ -39,7 +39,7 @@ executable_instruction!(
let memory_view = memory.view();
if length == 0 {
runtime.stack.push(InterfaceValue::String("".into()));
runtime.stack.push(InterfaceValue::ByteArray(vec![]));
return Ok(())
}

View File

@ -331,7 +331,9 @@ where
}
}
println!(" before transmuting: {:?}", result);
let result = safe_transmute::transmute_to_bytes::<u64>(&result);
println!(" after transmuting: {:?}", result);
let result_pointer = write_to_instance_mem(instance, instruction, &result)?;
Ok(result_pointer)