mirror of
https://github.com/janet-lang/janet
synced 2024-11-25 01:37:19 +00:00
Fix symbol lookup when symbol isn't found.
This commit is contained in:
parent
8d1ad99f42
commit
74348ab6c2
@ -374,6 +374,7 @@ JANET_CORE_FN(janet_core_native_lookup,
|
||||
JanetAbstractNative *anative = janet_getabstract(argv, 0, &janet_native_type);
|
||||
const char *sym = janet_getcstring(argv, 1);
|
||||
void *value = symbol_clib(anative->clib, sym);
|
||||
if (NULL == value) return janet_wrap_nil();
|
||||
return janet_wrap_pointer(value);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user