scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 689b7bf05b8a3612c26fced0b6bf9dd3f944902b
parent 1340a9b646844af4368ad3c3b275e53904019d83
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 24 Sep 2013 10:13:34 +0200

Fix bug pushing declarators of a variable

The end condition of the loop was wrong because it was testing
against the last valid position of the array, so the last value
of the array was never used.

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

diff --git a/decl.c b/decl.c @@ -228,7 +228,7 @@ declarator(struct ctype *tp, unsigned char ns) dirdcl(tp, ns); - for (lim = bp - 1, bp = qlf; bp < lim; ++bp) + for (lim = bp, bp = qlf; bp < lim; ++bp) pushtype(*bp); }