scc

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

commit f2cd2bd8855408a8be6399144d22d797bc0aea71
parent 4eb73f7f05187ace36463271ee3ec15309797f29
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 22 Feb 2018 07:46:15 +0000

[ar] Fix inlist()

We have NULL parameters now, so we have to check
against them.

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

diff --git a/ar/main.c b/ar/main.c @@ -202,7 +202,7 @@ static int inlist(char *fname, int argc, char *argv[]) { for (; argc-- > 0; ++argv) { - if (!strcmp(*argv, fname)) { + if (*argv && !strcmp(*argv, fname)) { *argv = NULL; return 1; }