Update of /cvsroot/z88dk/z88dk/src/sccz80
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8736
Modified Files:
stmt.c
Log Message:
fix for continue in for loops from Esa Hyytia - stops an infinite loop
in the following:
for ( i = 0; i < 10; i++ ) {
continue;
}
by actually testing the end loop condition
Index: stmt.c
===================================================================
RCS file: /cvsroot/z88dk/z88dk/src/sccz80/stmt.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** stmt.c 3 Mar 2004 15:40:28 -0000 1.11
--- stmt.c 30 Jan 2006 21:54:10 -0000 1.12
***************
*** 379,386 ****
jump(l_condition); /* goto condition */
postlabel(wq.loop); /* .loop */
- statement(); /* statement */
clearbuffer(buf3); /* modification */
! postlabel(l_condition); /* .condition */
clearbuffer(buf2); /* if (!condition) goto exit */
jump(wq.loop); /* goto loop */
postlabel(wq.exit); /* .exit */
--- 379,386 ----
jump(l_condition); /* goto condition */
postlabel(wq.loop); /* .loop */
clearbuffer(buf3); /* modification */
! postlabel(l_condition); /* .condition */
clearbuffer(buf2); /* if (!condition) goto exit */
+ statement(); /* statement */
jump(wq.loop); /* goto loop */
postlabel(wq.exit); /* .exit */
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642