mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 14:05:32 +00:00
ICU-21271 Fix valgrind failure in dtptngen.cpp
This commit is contained in:
parent
8e04bf016d
commit
ef4913316f
1 changed files with 1 additions and 1 deletions
|
@ -893,7 +893,7 @@ DateTimePatternGenerator::getCalendarTypeToUse(const Locale& locale, CharString&
|
|||
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; }
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue