Skip to content

Commit 6c9bbb0

Browse files
Zeno-RealBadAngel
authored andcommittedOct 29, 2014
Fix bug introduced by me (Zeno)
1 parent dd4c21c commit 6c9bbb0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/util/string.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,10 @@ inline std::vector<std::string> str_split(const std::string &str, char delimiter
125125

126126
inline std::string lowercase(const std::string &s)
127127
{
128-
std::string s2;
128+
std::string s2 = s;
129129
for(size_t i = 0; i < s.size(); i++)
130-
s2[i] = tolower(s.at(i));
130+
if (isupper(s2.at(i)))
131+
s2[i] = tolower(s2.at(i));
131132
return s2;
132133
}
133134

0 commit comments

Comments
 (0)
Please sign in to comment.