From df0951d6f8471b5a292c8a71b910cc04b9967b2f Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 2 Apr 2011 00:06:53 -0500 Subject: Fixed a GCC warning in LLPanelLogin::convertUsernameToLegacy(). Full warning message was: cc1plus: warnings being treated as errors /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_algo.h: In static member function ‘static bool LLPanelLogin::convertUsernameToLegacy(std::string&, std::string&, std::string&)’: /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/bits/stl_algo.h:1829: error: array subscript is above array bounds See also: http://stackoverflow.com/questions/1168525/c-gcc4-4-warning-array-subscript-is-above-array-bounds --- linden/indra/newview/llpanellogin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index ba5b963..e67e702 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp @@ -1084,7 +1084,8 @@ bool LLPanelLogin::convertUsernameToLegacy(std::string& username, std::string& f } std::vector names; - boost::algorithm::split(names, username, boost::is_any_of(" .")); + boost::algorithm::split(names, username, + boost::is_any_of(std::string(" ."))); // maybe they typed in a few too many spaces? if (names.size() > 2) -- cgit v1.1