@@ -179,10 +179,10 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
179
179
180
180
if (name_part.getType () == UMSGPAT_PART_TYPE_ARG_NAME) {
181
181
UnicodeString argName = mp.getSubstring (name_part);
182
- if ((storedType = (Formattable::Type*)zend_hash_str_find_ptr (ret, (char *)argName.getBuffer (), argName.length ())) == NULL ) {
182
+ if ((storedType = (Formattable::Type*)zend_hash_str_find_ptr (ret, (char *)argName.getBuffer (), argName.length () * sizeof (UChar) )) == NULL ) {
183
183
/* not found already; create new entry in HT */
184
184
Formattable::Type bogusType = Formattable::kObject ;
185
- storedType = (Formattable::Type*)zend_hash_str_update_mem (ret, (char *)argName.getBuffer (), argName.length (),
185
+ storedType = (Formattable::Type*)zend_hash_str_update_mem (ret, (char *)argName.getBuffer (), argName.length () * sizeof (UChar) ,
186
186
(void *)&bogusType, sizeof (bogusType));
187
187
}
188
188
} else if (name_part.getType () == UMSGPAT_PART_TYPE_ARG_NUMBER) {
@@ -427,7 +427,7 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo,
427
427
continue ;
428
428
}
429
429
430
- storedArgType = (Formattable::Type*)zend_hash_str_find_ptr (types, (char *)key.getBuffer (), key.length ());
430
+ storedArgType = (Formattable::Type*)zend_hash_str_find_ptr (types, (char *)key.getBuffer (), key.length () * sizeof (UChar) );
431
431
}
432
432
433
433
if (storedArgType != NULL ) {
0 commit comments