scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 8d908c4c320555aaef7fccc0e5c9399940dfe842
parent 91c841038b2cc8dcd84bd6dc6415453062e245b5
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed, 11 May 2016 12:20:47 +0200

[cc1] Increase the portability of digits()

This is a bit (totally) pedantic, but we were using the strchr approach
in readint, so it was a bit stupid don't being pedantic in digits() to.

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

diff --git a/cc1/lex.c b/cc1/lex.c @@ -354,7 +354,7 @@ digits(unsigned base) for (p = input->p; c = *p; ++p) { switch (base) { case 8: - if (c > '7' || c < '0') + if (!strchr("01234567", c)) goto end; break; case 10: