summaryrefslogtreecommitdiff
path: root/indra/llfilesystem
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-06-18 16:23:30 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-06-18 21:00:08 +0300
commit810219d3bf27d81751d0f41b65013ca31db34ff7 (patch)
treeccb6e96092a00df2db024037d1ca4cd4de3d730c /indra/llfilesystem
parentea83746cdab7225b070d0244bafbabdc7ac9eea3 (diff)
jira-archive-internal#67837 Fix LLDir::getScrubbedFileName
Diffstat (limited to 'indra/llfilesystem')
-rw-r--r--indra/llfilesystem/lldir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp
index 483ef0fd02..85ae6d4d1d 100644
--- a/indra/llfilesystem/lldir.cpp
+++ b/indra/llfilesystem/lldir.cpp
@@ -881,10 +881,10 @@ std::string LLDir::getScrubbedFileName(const std::string uncleanFileName)
std::string name(uncleanFileName);
const std::string illegalChars(getForbiddenFileChars());
// replace any illegal file chars with and underscore '_'
- for( unsigned int i = 0; i < illegalChars.length(); i++ )
+ for( const char &ch : illegalChars)
{
std::string::size_type j = -1;
- while((j = name.find(illegalChars[i])) > std::string::npos)
+ while((j = name.find(ch)) != std::string::npos)
{
name[j] = '_';
}