cvs: ZendEngine2 / zend_execute.c
| From: | Zeev Suraski | Date: | Tue, 03 Feb 2004 13:42:42 +0000 |
| Subject: | cvs: ZendEngine2 / zend_execute.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2301@lists.php.net to get a copy of this message | ||
zeev Tue Feb 3 08:42:42 2004 EDT
Modified files:
/ZendEngine2 zend_execute.c
Log:
Fix try/catch block logic
http://cvs.php.net/diff.php/ZendEngine2/zend_execute.c?r1=1.593&r2=1.594&ty=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.593 ZendEngine2/zend_execute.c:1.594
--- ZendEngine2/zend_execute.c:1.593 Tue Feb 3 07:17:09 2004
+++ ZendEngine2/zend_execute.c Tue Feb 3 08:42:41 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.593 2004/02/03 12:17:09 zeev Exp $ */
+/* $Id: zend_execute.c,v 1.594 2004/02/03 13:42:41 zeev Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -4094,10 +4094,12 @@
int encapsulating_block=-1;
for (i=0; i<EG(active_op_array)->last_try_catch; i++) {
- if (op_num >= EG(active_op_array)->try_catch_array[i].catch_op) {
+ if (EG(active_op_array)->try_catch_array[i].try_op > op_num) {
+ /* further blocks will not be relevant... */
break;
}
- if (op_num >= EG(active_op_array)->try_catch_array[i].try_op) {
+ if (op_num >= EG(active_op_array)->try_catch_array[i].try_op
+ && op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
encapsulating_block = i;
}
}