From 810219d3bf27d81751d0f41b65013ca31db34ff7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 18 Jun 2024 16:23:30 +0300 Subject: jira-archive-internal#67837 Fix LLDir::getScrubbedFileName --- indra/llfilesystem/lldir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llfilesystem') 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] = '_'; } -- cgit v1.2.3