From 6a55d10664840d794f364d2b97b6bca3bf800850 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 23 Jan 2022 22:44:18 +0100 Subject: lib: fix exists() error return value The current implementation incorrectly returned `false` which got treated as `NULL` instead of a boolean `false` value. Signed-off-by: Jo-Philipp Wich --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index ced0808..9d7b26a 100644 --- a/lib.c +++ b/lib.c @@ -445,7 +445,7 @@ uc_exists(uc_vm_t *vm, size_t nargs) char *k; if (ucv_type(obj) != UC_OBJECT) - return false; + return ucv_boolean_new(false); k = uc_cast_string(vm, &key, &freeable); -- cgit v1.2.3