Fix wasm_export_functions when using a return statement (#12107)

When used a return statement before we directly returned from the function which is obviously wrong.
This commit is contained in:
Bastian Köcher
2022-08-25 13:18:53 +02:00
committed by GitHub
parent 0fb0ef8c2f
commit 7c465dfe6a
3 changed files with 241 additions and 225 deletions
+2 -2
View File
@@ -90,7 +90,7 @@ macro_rules! wasm_export_functions {
&mut &input[..],
).expect("Input data is correctly encoded");
$( $fn_impl )*
(|| { $( $fn_impl )* })()
}
$crate::to_substrate_wasm_fn_return_value(&())
@@ -118,7 +118,7 @@ macro_rules! wasm_export_functions {
&mut &input[..],
).expect("Input data is correctly encoded");
$( $fn_impl )*
(|| { $( $fn_impl )* })()
};
$crate::to_substrate_wasm_fn_return_value(&output)