commit | ef4913316ffc896b5c17882b58730f2129a8fe38 | [log] [tgz] |
---|---|---|
author | Jeff Genovy <29107334+jefgen@users.noreply.github.com> | Fri Sep 04 12:15:20 2020 -0700 |
committer | Jeff Genovy <29107334+jefgen@users.noreply.github.com> | Tue Sep 08 13:52:53 2020 -0700 |
tree | 0e6d55e6ea2f0f440ada69db39c38b1dacc84cd5 | |
parent | 8e04bf016d266dd2e7a99b15d0eb7f22cb58ce8c [diff] |
ICU-21271 Fix valgrind failure in dtptngen.cpp
diff --git a/icu4c/source/i18n/dtptngen.cpp b/icu4c/source/i18n/dtptngen.cpp index 02be4f0..32d3fc4 100644 --- a/icu4c/source/i18n/dtptngen.cpp +++ b/icu4c/source/i18n/dtptngen.cpp
@@ -893,7 +893,7 @@ err = localStatus; return; } - if (calendarTypeLen < ULOC_KEYWORDS_CAPACITY) { + if (calendarTypeLen > 0 && calendarTypeLen < ULOC_KEYWORDS_CAPACITY) { destination.clear().append(calendarType, -1, err); if (U_FAILURE(err)) { return; } }