Skip to content

Commit e387c69

Browse files
committed
ICU-13489 Merging addtional change (r40723 - fixing AIX/older gcc build issues) in #13457 to maint-60 for 60.2
X-SVN-Rev: 40727
1 parent 42f3b2d commit e387c69

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

icu4c/source/i18n/calendar.cpp

+11-9
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,10 @@ fTime(0),
706706
fLenient(TRUE),
707707
fZone(NULL),
708708
fRepeatedWallTime(UCAL_WALLTIME_LAST),
709-
fSkippedWallTime(UCAL_WALLTIME_LAST),
710-
validLocale(""),
711-
actualLocale("")
709+
fSkippedWallTime(UCAL_WALLTIME_LAST)
712710
{
711+
validLocale[0] = 0;
712+
actualLocale[0] = 0;
713713
clear();
714714
if (U_FAILURE(success)) {
715715
return;
@@ -734,10 +734,10 @@ fTime(0),
734734
fLenient(TRUE),
735735
fZone(NULL),
736736
fRepeatedWallTime(UCAL_WALLTIME_LAST),
737-
fSkippedWallTime(UCAL_WALLTIME_LAST),
738-
validLocale(""),
739-
actualLocale("")
737+
fSkippedWallTime(UCAL_WALLTIME_LAST)
740738
{
739+
validLocale[0] = 0;
740+
actualLocale[0] = 0;
741741
if (U_FAILURE(success)) {
742742
return;
743743
}
@@ -768,10 +768,10 @@ fTime(0),
768768
fLenient(TRUE),
769769
fZone(NULL),
770770
fRepeatedWallTime(UCAL_WALLTIME_LAST),
771-
fSkippedWallTime(UCAL_WALLTIME_LAST),
772-
validLocale(""),
773-
actualLocale("")
771+
fSkippedWallTime(UCAL_WALLTIME_LAST)
774772
{
773+
validLocale[0] = 0;
774+
actualLocale[0] = 0;
775775
if (U_FAILURE(success)) {
776776
return;
777777
}
@@ -830,6 +830,8 @@ Calendar::operator=(const Calendar &right)
830830
fNextStamp = right.fNextStamp;
831831
uprv_strncpy(validLocale, right.validLocale, sizeof(validLocale));
832832
uprv_strncpy(actualLocale, right.actualLocale, sizeof(actualLocale));
833+
validLocale[sizeof(validLocale)-1] = 0;
834+
actualLocale[sizeof(validLocale)-1] = 0;
833835
}
834836

835837
return *this;

0 commit comments

Comments
 (0)