From b1d28350499d0553067e774f72e4e98c836ae92f Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 15 May 2024 15:05:30 -0700 Subject: gas: Fix \+ expansion for .irp and .irpc .irp and .irpc receive a null macro_entry. \+ causes a crash after the recent \+ support. Restore the previous behavior. Signed-off-by: Fangrui Song --- gas/macro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gas/macro.c') diff --git a/gas/macro.c b/gas/macro.c index 72d869d..3036e6a 100644 --- a/gas/macro.c +++ b/gas/macro.c @@ -854,7 +854,7 @@ macro_expand_body (sb *in, sb *out, formal_entry *formals, sprintf (buffer, "%u", macro_number); sb_add_string (out, buffer); } - else if (src < in->len && in->ptr[src] == '+') + else if (macro && src < in->len && in->ptr[src] == '+') { /* Sub in the current macro invocation number. */ -- cgit v1.1