From 6c9bbb03609d79d455266935947f9bb844022972 Mon Sep 17 00:00:00 2001 From: Craig Robbins Date: Wed, 29 Oct 2014 17:47:13 +1000 Subject: Fix bug introduced by me (Zeno) --- src/util/string.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/util/string.h b/src/util/string.h index 9f7b6673d..c983668a9 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -125,9 +125,10 @@ inline std::vector str_split(const std::string &str, char delimiter inline std::string lowercase(const std::string &s) { - std::string s2; + std::string s2 = s; for(size_t i = 0; i < s.size(); i++) - s2[i] = tolower(s.at(i)); + if (isupper(s2.at(i))) + s2[i] = tolower(s2.at(i)); return s2; } -- cgit v1.2.3