@@ -185,10 +185,10 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
185
185
186
186
if (name_part.getType () == UMSGPAT_PART_TYPE_ARG_NAME) {
187
187
UnicodeString argName = mp.getSubstring (name_part);
188
- if ((storedType = (Formattable::Type*)zend_hash_str_find_ptr (ret, (char *)argName.getBuffer (), argName.length ())) == NULL ) {
188
+ if ((storedType = (Formattable::Type*)zend_hash_str_find_ptr (ret, (char *)argName.getBuffer (), argName.length () * sizeof (UChar) )) == NULL ) {
189
189
/* not found already; create new entry in HT */
190
190
Formattable::Type bogusType = Formattable::kObject ;
191
- if ((storedType = (Formattable::Type*)zend_hash_str_update_mem (ret, (char *)argName.getBuffer (), argName.length (),
191
+ if ((storedType = (Formattable::Type*)zend_hash_str_update_mem (ret, (char *)argName.getBuffer (), argName.length () * sizeof (UChar) ,
192
192
(void *)&bogusType, sizeof (bogusType))) == NULL ) {
193
193
intl_errors_set (&err, U_MEMORY_ALLOCATION_ERROR,
194
194
" Write to argument types hash table failed" , 0 );
@@ -450,7 +450,7 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo,
450
450
continue ;
451
451
}
452
452
453
- storedArgType = (Formattable::Type*)zend_hash_str_find_ptr (types, (char *)key.getBuffer (), key.length ());
453
+ storedArgType = (Formattable::Type*)zend_hash_str_find_ptr (types, (char *)key.getBuffer (), key.length () * sizeof (UChar) );
454
454
}
455
455
456
456
if (storedArgType != NULL ) {
0 commit comments