scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 7f10d5f134cd84a665e3add7ffc47f329238b055
parent 20ac64057b98721b685c551a0b4343191a8a5fe5
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 19 Jan 2024 18:52:21 +0100

make: Avoid null repl and to

When macro expansions happen we were expecting to
receive always a valid repl and to strings, that
in case of not using the replacement format they
were empty strings, but in the case of expansions
of variables with only one letter they were null
values defeating the checks in expandmacro().

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

diff --git a/src/cmd/make/parser.c b/src/cmd/make/parser.c @@ -502,7 +502,7 @@ expandsimple(Target *tp) default: token[0] = c; token[1] = '\0'; - expandmacro(token, NULL, NULL); + expandmacro(token, "", ""); break; } }