settings: compare config option/key names properly
This commit is contained in:
10
src/conv.cpp
10
src/conv.cpp
@@ -311,13 +311,15 @@ void Trim(std::string &s)
|
||||
size_t b = 0;
|
||||
size_t e = s.length()-1;
|
||||
|
||||
while (s[b] == ' ' || s[b] == '\n')
|
||||
++b;
|
||||
while (s[e] == ' ' || s[e] == '\n')
|
||||
--e;
|
||||
++e;
|
||||
if (e != s.length())
|
||||
s.resize(e);
|
||||
|
||||
if (b != 0 || e != s.length()-1)
|
||||
s = s.substr(b, e-b);
|
||||
while (s[b] == ' ' || s[b] == '\n')
|
||||
++b;
|
||||
if (b != 0)
|
||||
s = s.substr(b);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user