mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-12 16:41:21 +00:00
fix(runtime-c-api) Fix the imports
length.
`imports` contains `func_import`, `global_import`, `memory_import` and `table_import`, so 4 items. This patch updates the length of `imports` when calling the `wasmer_instantiate` function.
This commit is contained in:
@ -127,7 +127,7 @@ int main()
|
||||
|
||||
// Creates a WebAssembly Instance from wasm bytes and imports
|
||||
wasmer_instance_t *instance = NULL;
|
||||
wasmer_result_t compile_result = wasmer_instantiate(&instance, bytes, len, imports, 3);
|
||||
wasmer_result_t compile_result = wasmer_instantiate(&instance, bytes, len, imports, 4);
|
||||
printf("Compile result: %d\n", compile_result);
|
||||
if (compile_result != WASMER_OK)
|
||||
{
|
||||
|
Reference in New Issue
Block a user