summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-01-23 22:44:18 +0100
committerJo-Philipp Wich <jo@mein.io>2022-01-26 10:47:56 +0100
commit6a55d10664840d794f364d2b97b6bca3bf800850 (patch)
tree9771a92f561cb4c17f024dc768eb4b3f0807c6d8
parent04fa2baba6d615c49cf3f77986595da2a7783899 (diff)
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 <jo@mein.io>
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
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);