lib/mu-store: don't assume non-empty in remove_slash
HT: Arsen Arsenović Fixes #2633.
This commit is contained in:
@ -52,7 +52,7 @@ static std::string
|
|||||||
remove_slash(const std::string& str)
|
remove_slash(const std::string& str)
|
||||||
{
|
{
|
||||||
auto clean{str};
|
auto clean{str};
|
||||||
while (clean[clean.length() - 1] == '/')
|
while (!clean.empty() && clean[clean.length() - 1] == '/')
|
||||||
clean.pop_back();
|
clean.pop_back();
|
||||||
|
|
||||||
return clean;
|
return clean;
|
||||||
|
|||||||
Reference in New Issue
Block a user