From 565e05204abf0706adafba68a49f5496d67d081e Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 8 Mar 2021 17:10:10 +0100 Subject: lib: use uc_prototype_lookup() to obain search path property value Signed-off-by: Jo-Philipp Wich --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index ba49927..5e4c0a0 100644 --- a/lib.c +++ b/lib.c @@ -1673,7 +1673,7 @@ uc_require(uc_vm *vm, size_t nargs) return NULL; name = json_object_get_string(val); - search = vm->globals ? json_object_object_get(vm->globals->header.jso, "REQUIRE_SEARCH_PATH") : NULL; + search = uc_prototype_lookup(vm->globals, "REQUIRE_SEARCH_PATH"); if (!json_object_is_type(search, json_type_array)) { uc_vm_raise_exception(vm, EXCEPTION_RUNTIME, -- cgit v1.2.3