Skip to content

Commit ed0602f

Browse files
committed
Fix string extension in negate_num_string
Forgot to actually assign the reallocated string...
1 parent 06699ab commit ed0602f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@ zend_ast *zend_negate_num_string(zend_ast *ast) /* {{{ */
18421842
}
18431843
} else if (Z_TYPE_P(zv) == IS_STRING) {
18441844
size_t orig_len = Z_STRLEN_P(zv);
1845-
zend_string_extend(Z_STR_P(zv), orig_len + 1, 0);
1845+
Z_STR_P(zv) = zend_string_extend(Z_STR_P(zv), orig_len + 1, 0);
18461846
memmove(Z_STRVAL_P(zv) + 1, Z_STRVAL_P(zv), orig_len + 1);
18471847
Z_STRVAL_P(zv)[0] = '-';
18481848
} else {

0 commit comments

Comments
 (0)