harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

commit 5d8a972bab7e7befa23a1e511ed32e3b868d48a8
parent 84835b6530c0f196507aae0c77a4cf98cbce749e
Author: Bor Grošelj Simić <bgs@turminal.net>
Date:   Sun, 30 Oct 2022 21:22:58 +0100

don't strip last char of ! assertion message

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>

Diffstat:
Msrc/check.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/check.c b/src/check.c @@ -2328,7 +2328,7 @@ check_expr_propagate(struct context *ctx, case_err->value->assert.message->type = EXPR_CONSTANT; case_err->value->assert.message->result = &builtin_type_const_str; case_err->value->assert.message->constant.string.value = s; - case_err->value->assert.message->constant.string.len = n - 1; + case_err->value->assert.message->constant.string.len = n; } else { if (!type_is_assignable(ctx->fntype->func.result, return_type)) { error(ctx, aexpr->loc, expr,