mirror of https://github.com/djcb/mu.git
lib/mu-store: don't assume non-empty in remove_slash
HT: Arsen Arsenović Fixes #2633.
This commit is contained in:
parent
f103e19a5a
commit
5a763af970
|
@ -52,7 +52,7 @@ static std::string
|
|||
remove_slash(const std::string& str)
|
||||
{
|
||||
auto clean{str};
|
||||
while (clean[clean.length() - 1] == '/')
|
||||
while (!clean.empty() && clean[clean.length() - 1] == '/')
|
||||
clean.pop_back();
|
||||
|
||||
return clean;
|
||||
|
|
Loading…
Reference in New Issue