summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-02-07 16:44:00 +0000
committerDmitry Stogov <dmitry@php.net>2005-02-07 16:44:00 +0000
commit625e06f454d656fb10c7e0e67682956efdebbd56 (patch)
tree143487ffc6a51d8ee353ed80a8fb603a6bc7e7ae
parenta8552cb2f95d279a43f03bcea67e58aae49520d1 (diff)
downloadphp-git-625e06f454d656fb10c7e0e67682956efdebbd56.tar.gz
Fixed FE_RESET/FE_FETCH bug.
Now FE_RESET instruction takes jump-address from itself, not from the following FE_FETCH instruction.
-rw-r--r--Zend/zend_compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index ca4171e8b8..1b9bfe2bee 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3478,6 +3478,7 @@ void zend_do_foreach_end(znode *foreach_token TSRMLS_DC)
SET_UNUSED(opline->op2);
CG(active_op_array)->opcodes[foreach_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[foreach_token->u.opline_num-1].op2.u.opline_num = get_next_op_number(CG(active_op_array)); /* FE_RESET */
do_end_loop(foreach_token->u.opline_num TSRMLS_CC);