Address #1001 - don't process names passed to dlopen.

This commit is contained in:
Calvin Rose 2022-07-19 20:04:17 -05:00
parent e001efa9fd
commit fb5b056f7b
1 changed files with 1 additions and 3 deletions

View File

@ -1183,9 +1183,7 @@ JANET_CORE_FN(janet_core_raw_native,
"Returns a `core/native`.") {
janet_arity(argc, 0, 1);
const char *path = janet_optcstring(argv, argc, 0, NULL);
char *processed_name = (NULL == path) ? NULL : get_processed_name(path);
Clib lib = load_clib(processed_name);
if (NULL != path && path != processed_name) janet_free(processed_name);
Clib lib = load_clib(path);
if (!lib) janet_panic(error_clib());
JanetAbstractNative *anative = janet_abstract(&janet_native_type, sizeof(JanetAbstractNative));
anative->clib = lib;