scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | 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:
Mdecl.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); }