From 0098a236076701bc5bbfa80e2f97f360d332b6a8 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 16 Sep 2010 20:01:00 +0300 Subject: 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. --- indra/llcommon/llstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llstring.cpp') diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 33b55d843c..ae7e624a1a 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -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" ) { -- cgit v1.2.3