STORM-180 FIXED Fixed crash on login in Japanese locale.

The crash was caused by erroneous getting of month name from vector with week day names in LLStringUtil::formatDatetime().
This code woth introduced in June, so though it didn't work properly, it didn't cause the crash(cause June is 5th month). But when
number of current month exceeded number of days in week(this happened in August cause it is 8th) code started getting 8th element from
vector with 7. This caused the crash. It reproduced only on Japanese locale because only there code that caused it was used(see STORM-177
for details). This changeset seems to fix STORM-177 too.

- Used vector with months names where it should be.
master
Andrew Dyukov 2010-09-16 20:01:00 +03:00
parent 1dbcc3fff7
commit 0098a23607
1 changed files with 1 additions and 1 deletions

View File

@ -1112,7 +1112,7 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
else if(LLStringOps::sMonthList.size() == 12 && code == "%B")
{
struct tm * gmt = gmtime (&loc_seconds);
replacement = LLStringOps::sWeekDayList[gmt->tm_mon];
replacement = LLStringOps::sMonthList[gmt->tm_mon];
}
else if( !LLStringOps::sDayFormat.empty() && code == "%d" )
{