summary refs log tree commit diff
path: root/minic
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-02 15:46:24 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-02 15:46:24 -0400
commit04ed7f56aad27062a38a70936ec760ec99c99089 (patch)
treee2d1de213267628aca8f455211d8577578dacfa3 /minic
parentd1c348bf151500cadf5b694fa80f085f5555bc9e (diff)
downloadroux-04ed7f56aad27062a38a70936ec760ec99c99089.tar.gz
minor bug in case While
Diffstat (limited to 'minic')
-rw-r--r--minic/minic.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/minic/minic.y b/minic/minic.y
index 85a5164..63fafc4 100644
--- a/minic/minic.y
+++ b/minic/minic.y
@@ -386,10 +386,10 @@ Again:
 		}
 		break;
 	case While:
-		x = expr(s->p1);
 		l = lbl;
 		lbl += 3;
 		fprintf(of, "@l%d\n", l);
+		x = expr(s->p1);
 		fprintf(of, "\tjnz ");                  /* ditto */
 		psymb(x);
 		fprintf(of, ", @l%d, @l%d\n", l+1, l+2);