Skip to content

Commit 008408f

Browse files
committed
Revert "ext/intl: intl_CharFromString using zend_string_truncate to adjust th… (php#11575)"
This reverts commit 44fa68b.
1 parent cc4951e commit 008408f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/intl/intl_convertcpp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status)
7979
zend_string_free(u8res);
8080
return NULL;
8181
}
82-
u8res = zend_string_truncate(u8res, actual_len, 0);
82+
ZSTR_VAL(u8res)[actual_len] = '\0';
83+
ZSTR_LEN(u8res) = actual_len;
8384

8485
return u8res;
8586
}

0 commit comments

Comments
 (0)