summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-03-08 17:10:10 +0100
committerJo-Philipp Wich <jo@mein.io>2021-03-08 19:18:58 +0100
commit565e05204abf0706adafba68a49f5496d67d081e (patch)
treeeea4bdc859f9c5174bcb42989c46c2078ed8450b
parent8adf4832294f2e379bb45dec16abb41f4c9250e0 (diff)
lib: use uc_prototype_lookup() to obain search path property value
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
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,