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:
Ivan Enderlin
2019-03-11 14:35:51 +01:00
parent a61fdf8b0b
commit 3fea07dc8a

View File

@ -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)
{