mirror of
https://github.com/janet-lang/janet
synced 2024-12-24 07:20:27 +00:00
Address #1001 - don't process names passed to dlopen.
This commit is contained in:
parent
e001efa9fd
commit
fb5b056f7b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user