shithub: scc

Download patch

ref: 689b7bf05b8a3612c26fced0b6bf9dd3f944902b
parent: 1340a9b646844af4368ad3c3b275e53904019d83
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Sep 24 06:13:34 EDT 2013

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.

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