From 85294ccd96957fecf890811ffd05614efb62dbac Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 17 Feb 2022 18:06:22 -0500 Subject: [PATCH] fix: Correct error handling get_globals_len --- runtime/include/sledge_abi_symbols.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/include/sledge_abi_symbols.h b/runtime/include/sledge_abi_symbols.h index 4238697..c7acb69 100644 --- a/runtime/include/sledge_abi_symbols.h +++ b/runtime/include/sledge_abi_symbols.h @@ -80,7 +80,7 @@ sledge_abi_symbols_init(struct sledge_abi_symbols *abi, char *path) abi->max_pages = get_max_pages(); sledge_abi__wasm_memory_globals_len_fn_t get_globals_len = dlsym(abi->handle, SLEDGE_ABI__GLOBALS_LEN); - if (get_max_pages == NULL) { + if (get_globals_len == NULL) { fprintf(stderr, "Failed to resolve symbol %s in %s with error: %s\n", SLEDGE_ABI__GLOBALS_LEN, path, dlerror()); goto dl_error;