Commit 18ce8cba38b38893c6f07c7ea60af0b92cd53d28

Thomas de Grivel 2024-01-29T18:46:44

fix error handling in env_eval_str

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libc3/env.c b/libc3/env.c
index d8cfd0f..ad006cf 100644
--- a/libc3/env.c
+++ b/libc3/env.c
@@ -672,7 +672,7 @@ bool env_eval_str (s_env *env, const s_str *str, s_tag *dest)
 {
   bool r = true;
   s_tag tmp;
-  if (str_parse_eval(str, &tmp) < 0) {
+  if (! str_parse_eval(str, &tmp)) {
     err_puts("env_eval_str: invalid Str");
     assert(! "env_eval_str: invalid Str");
     return false;