ICU-20441 fix uninitialized fHasHanYearChar

This commit is contained in:
Peter Edberg 2019-02-21 23:17:37 -08:00 committed by pedberg-icu
parent 9a7bf5cea8
commit a9b26a447d
2 changed files with 2 additions and 1 deletions

View file

@ -4217,6 +4217,7 @@ SimpleDateFormat::tzFormat(UErrorCode &status) const {
void SimpleDateFormat::parsePattern() {
fHasMinute = FALSE;
fHasSecond = FALSE;
fHasHanYearChar = FALSE;
int len = fPattern.length();
UBool inQuote = FALSE;

View file

@ -1064,7 +1064,7 @@ void DateIntervalFormatTest::testFormat() {
"ja-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "GyMMMd", "\\u662D\\u548C64\\u5E741\\u67085\\u65E5\\uFF5E\\u5E73\\u6210\\u5143\\u5E741\\u670815\\u65E5",
"ja-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "GGGGGyMd", "S64/1/5\\uFF5EH\\u5143/1/15", // The GGGGG/G forces inheritance from a different pattern, no padding
"ja-u-ca-japanese", "S 64 01 05 09:00:00", "H 1 01 15 09:00:00", "GGGGGyMd", "S64/1/5\\uFF5EH1/1/15", // The GGGGG/G forces inheritance from a different pattern, no padding
"ja-u-ca-japanese", "H 31 04 15 09:00:00", JP_ERA_2019_NARROW " 1 05 15 09:00:00", "GGGGGyMd", "H31/4/15\\uFF5E" JP_ERA_2019_NARROW "1/5/15",