lib/mu-store: don't assume non-empty in remove_slash

HT: Arsen Arsenović

Fixes #2633.
This commit is contained in:
Dirk-Jan C. Binnema 2024-02-25 17:05:51 +02:00
parent f103e19a5a
commit 5a763af970
1 changed files with 1 additions and 1 deletions

View File

@ -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;