commit 847cf9b70c80ed7df4cb062956b9ab12c9ebb88c
parent 26cee7b5ccaf8b3d8795e17c4fa489365f8cadd4
Author: Ember Sawady <ecs@d2evs.net>
Date: Mon, 6 Feb 2023 16:34:34 +0000
Set expr->constant.uval = 0 for STORAGE_ERROR
Signed-off-by: Ember Sawady <ecs@d2evs.net>
Diffstat:
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/check.c b/src/check.c
@@ -70,6 +70,7 @@ verror(struct context *ctx, const struct location loc, struct expression *expr,
if (expr) {
expr->type = EXPR_CONSTANT;
expr->result = &builtin_type_error;
+ expr->constant.uval = 0; // XXX: ival?
expr->terminates = false;
expr->loc = loc;
}
diff --git a/src/eval.c b/src/eval.c
@@ -964,6 +964,7 @@ eval_unarithm(struct context *ctx, struct expression *in, struct expression *out
if (in->unarithm.operand->result == &builtin_type_error) {
out->type = EXPR_CONSTANT;
out->result = &builtin_type_error;
+ out->constant.uval = 0;
return EVAL_OK;
}
if (in->unarithm.operand->type != EXPR_ACCESS) {