mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-10 14:48:27 +00:00
fix(c-api) Register errors from wasm_module_serialize.
This commit is contained in:
@@ -108,7 +108,10 @@ pub unsafe extern "C" fn wasm_module_serialize(
|
||||
) {
|
||||
let byte_vec = match module.inner.serialize() {
|
||||
Ok(byte_vec) => byte_vec,
|
||||
Err(_) => return,
|
||||
Err(err) => {
|
||||
crate::error::update_last_error(err);
|
||||
return;
|
||||
}
|
||||
};
|
||||
*out_ptr = byte_vec.into();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user