summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/confbase.Y3
1 files changed, 1 insertions, 2 deletions
diff --git a/conf/confbase.Y b/conf/confbase.Y
index 3fd034db..3d573e10 100644
--- a/conf/confbase.Y
+++ b/conf/confbase.Y
@@ -124,8 +124,7 @@ conf: definition ;
definition:
DEFINE SYM '=' term ';' {
struct f_val *val = cfg_alloc(sizeof(struct f_val));
- *val = f_eval($4, cfg_mem);
- if (val->type == T_RETURN) cf_error("Runtime error");
+ if (f_eval($4, cfg_mem, val) > F_RETURN) cf_error("Runtime error");
cf_define_symbol($2, SYM_CONSTANT | val->type, val);
}
;