From 1c5f2de0ea49b930fc16bbf187b1adb64cd01832 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Fri, 14 Jun 2024 09:37:41 +0100 Subject: [PATCH] Dup with 'repeat * size' not just 'repeat' for constants --- kwd.c | 2 +- process.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kwd.c b/kwd.c index 73f1209..01a2df4 100644 --- a/kwd.c +++ b/kwd.c @@ -266,7 +266,7 @@ static void handle_constant (char *start, char **pp, int size) { if (expr.type == EXPR_TYPE_CONSTANT) { - repeat = expr.add_number; + repeat = expr.add_number * size; if (repeat == 0) { diff --git a/process.c b/process.c index c0a38c8..8922628 100644 --- a/process.c +++ b/process.c @@ -338,7 +338,7 @@ static void handler_error (char *start, char **pp) { } temp = xmalloc (1 + strlen (type) + 1 + strlen (*pp) + 1); - sprintf (temp, "#%s %s", type, *pp); + sprintf (temp, "%%%s %s", type, *pp); report_line_at (get_filename (), get_line_number (), REPORT_ERROR, start, skip_whitespace (start + 1), "%s", temp); free (temp); @@ -473,7 +473,7 @@ static void handler_warning (char *start, char **pp) { } temp = xmalloc (1 + strlen (type) + 1 + strlen (*pp) + 1); - sprintf (temp, "#%s %s", type, *pp); + sprintf (temp, "%%%s %s", type, *pp); report_line_at (get_filename (), get_line_number (), REPORT_WARNING, start, skip_whitespace (start + 1), "%s", temp); free (temp); -- 2.34.1