Commit 63ba02c37896c154cad64853cf82c63ea33df0a1

Thomas de Grivel 2024-02-20T16:41:53

fix special_operator_arity

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libc3/env.c b/libc3/env.c
index fecb083..ad01411 100644
--- a/libc3/env.c
+++ b/libc3/env.c
@@ -1658,7 +1658,7 @@ u8 env_special_operator_arity (s_env *env, const s_ident *ident)
   facts_with_tags(&env->facts, &cursor,
                   &tag_ident, &tag_arity, &tag_var);
   if (facts_cursor_next(&cursor)) {
-    if (tag_var.type != TAG_U8) {
+    if (tag_var.type != TAG_U8 || ! tag_var.data.u8) {
       err_write_1("env_special_operator_arity: "
                   "invalid arity for special operator ");
       err_inspect_ident(&tag_ident.data.ident);