Skip to content

Commit 645ef62

Browse files
committed
Fix enum cast AST allocation
I missed this occurrence of the hardcoded number "3".
1 parent 70195c3 commit 645ef62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_enum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ static zend_ast_ref *create_enum_case_ast(
425425
GC_SET_REFCOUNT(ref, 1);
426426
GC_TYPE_INFO(ref) = GC_CONSTANT_AST | GC_PERSISTENT | GC_IMMUTABLE;
427427

428-
zend_ast *ast = (zend_ast *) p; p += zend_ast_size(3);
428+
zend_ast *ast = (zend_ast *) p; p += zend_ast_size(num_children);
429429
ast->kind = ZEND_AST_CONST_ENUM_INIT;
430430
ast->attr = 0;
431431
ast->lineno = 0;

0 commit comments

Comments
 (0)