diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-03-08 17:09:55 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-03-08 19:18:58 +0100 |
commit | 8adf4832294f2e379bb45dec16abb41f4c9250e0 (patch) | |
tree | 5339f440a606876feced0b1f52b1bab12b853d8d | |
parent | cef905b811b5e557e4aea01ccf76a7cddebd6d04 (diff) |
vm: use uc_prototype_lookup() to obtain require function pointer
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |