@@ -191,10 +191,10 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
191
191
192
192
if (name_part.getType () == UMSGPAT_PART_TYPE_ARG_NAME) {
193
193
UnicodeString argName = mp.getSubstring (name_part);
194
- if ((storedType = (Formattable::Type*)zend_hash_str_find_ptr (ret, (char *)argName.getBuffer (), argName.length ())) == NULL ) {
194
+ if ((storedType = (Formattable::Type*)zend_hash_str_find_ptr (ret, (char *)argName.getBuffer (), argName.length () * sizeof (UChar) )) == NULL ) {
195
195
/* not found already; create new entry in HT */
196
196
Formattable::Type bogusType = Formattable::kObject ;
197
- storedType = (Formattable::Type*)zend_hash_str_update_mem (ret, (char *)argName.getBuffer (), argName.length (),
197
+ storedType = (Formattable::Type*)zend_hash_str_update_mem (ret, (char *)argName.getBuffer (), argName.length () * sizeof (UChar) ,
198
198
(void *)&bogusType, sizeof (bogusType));
199
199
}
200
200
} else if (name_part.getType () == UMSGPAT_PART_TYPE_ARG_NUMBER) {
@@ -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