Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Zend/zend_opcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,9 @@ static void zend_check_finally_breakout(zend_op_array *op_array, uint32_t op_num
}
}

static uint32_t zend_get_brk_cont_target(const zend_op_array *op_array, const zend_op *opline) {
int nest_levels = opline->op2.num;
int array_offset = opline->op1.num;
static uint32_t zend_get_brk_cont_target(const zend_op *opline) {
uint32_t nest_levels = opline->op2.num;
uint32_t array_offset = opline->op1.num;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically should be fine, but we use int and even zend_long in other places (e.g. zend_compile_break_continue(), CG(context).current_brk_cont, etc.). If this needs to be adjusted, all of them should be.

zend_brk_cont_element *jmp_to;
do {
jmp_to = &CG(context).brk_cont_array[array_offset];
Expand Down Expand Up @@ -1120,7 +1120,7 @@ ZEND_API void pass_two(zend_op_array *op_array)
case ZEND_BRK:
case ZEND_CONT:
{
uint32_t jmp_target = zend_get_brk_cont_target(op_array, opline);
uint32_t jmp_target = zend_get_brk_cont_target(opline);

if (op_array->fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK) {
zend_check_finally_breakout(op_array, opline - op_array->opcodes, jmp_target);
Expand Down