summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-03-08 17:09:55 +0100
committerJo-Philipp Wich <jo@mein.io>2021-03-08 19:18:58 +0100
commit8adf4832294f2e379bb45dec16abb41f4c9250e0 (patch)
tree5339f440a606876feced0b1f52b1bab12b853d8d
parentcef905b811b5e557e4aea01ccf76a7cddebd6d04 (diff)
vm: use uc_prototype_lookup() to obtain require function pointer
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm.c b/vm.c
index cd71bc6..ca0435a 100644
--- a/vm.c
+++ b/vm.c
@@ -2150,7 +2150,7 @@ uc_vm_preload(uc_vm *vm, json_object *modules)
if (!json_object_is_type(modules, json_type_array))
return STATUS_OK;
- requirefn = json_object_object_get(vm->globals->header.jso, "require");
+ requirefn = uc_prototype_lookup(vm->globals, "require");
if (!uc_object_is_type(requirefn, UC_OBJ_CFUNCTION))
return STATUS_OK;