diff options
| author | Florian Westphal <fw@strlen.de> | 2025-06-13 16:46:06 +0200 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2025-06-19 00:49:57 +0200 |
| commit | 845b8d7208077310e77560a64b698973fb047ef2 (patch) | |
| tree | bf864e0685cb62b49b9a32a943874b093178cb73 /src | |
| parent | 2a38f458f12bc032dac1b3ba63f95ca5a3c03fbd (diff) | |
evaluate: don't BUG on unexpected base datatype
Included bogon will cause a crash but this is the evaluation stage where
we can just emit an error instead.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src')
| -rw-r--r-- | src/evaluate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index 9c7f23cb..872a9e0d 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -482,7 +482,8 @@ static int expr_evaluate_value(struct eval_ctx *ctx, struct expr **expr) return -1; break; default: - BUG("invalid basetype %s\n", expr_basetype(*expr)->name); + return expr_error(ctx->msgs, *expr, "Unexpected datatype %s", + (*expr)->dtype->name); } return 0; } |
