From: Robert Pengelly Date: Fri, 14 Jun 2024 08:37:41 +0000 (+0100) Subject: Dup with 'repeat * size' not just 'repeat' for constants X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=1c5f2de0ea49b930fc16bbf187b1adb64cd01832;p=sasm.git Dup with 'repeat * size' not just 'repeat' for constants --- 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);