summary refs log tree commit diff
path: root/rega.c
diff options
context:
space:
mode:
Diffstat (limited to 'rega.c')
-rw-r--r--rega.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rega.c b/rega.c
index 2f01c07..619b0e2 100644
--- a/rega.c
+++ b/rega.c
@@ -506,7 +506,7 @@ rega(Fn *fn)
 	for (bp=blk, b=fn->start; b; b=b->link)
 		*bp++ = b;
 	qsort(blk, fn->nblk, sizeof blk[0], carve);
-	for (b=fn->start, i=b->ins; i-b->ins < b->nins; i++)
+	for (b=fn->start, i=b->ins; i<&b->ins[b->nins]; i++)
 		if (i->op != Ocopy || !isreg(i->arg[0]))
 			break;
 		else {