ICU-22132.patch 1.1 KB

12345678910111213141516171819202122232425
  1. diff -u a/i18n/vtzone.cpp a/i18n/vtzone.cpp
  2. --- a/i18n/vtzone.cpp 2023-07-14 09:05:38.000000000 +0100
  3. +++ b/i18n/vtzone.cpp 2023-07-14 09:05:38.000000000 +0100
  4. @@ -1735,14 +1735,14 @@
  5. }
  6. }
  7. } else {
  8. - UnicodeString icutzprop;
  9. - UVector customProps(nullptr, uhash_compareUnicodeString, status);
  10. + UVector customProps(uprv_deleteUObject, uhash_compareUnicodeString, status);
  11. if (olsonzid.length() > 0 && icutzver.length() > 0) {
  12. - icutzprop.append(olsonzid);
  13. - icutzprop.append(u'[');
  14. - icutzprop.append(icutzver);
  15. - icutzprop.append(u']');
  16. - customProps.addElement(&icutzprop, status);
  17. + LocalPointer<UnicodeString> icutzprop(new UnicodeString(ICU_TZINFO_PROP), status);
  18. + icutzprop->append(olsonzid);
  19. + icutzprop->append(u'[');
  20. + icutzprop->append(icutzver);
  21. + icutzprop->append(u']');
  22. + customProps.adoptElement(icutzprop.orphan(), status);
  23. }
  24. writeZone(writer, *tz, &customProps, status);
  25. }