Fix out-of-bounds.

This commit is contained in:
Christian Speckner 2022-06-04 08:45:39 +02:00
parent bf78b34848
commit dff9606216
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ bool FileListWidget::hasNextHistory()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string& FileListWidget::fixPath(string& path)
{
if(path.back() == FilesystemNode::PATH_SEPARATOR)
if(path.length() > 0 && path.back() == FilesystemNode::PATH_SEPARATOR)
{
path.pop_back();
if(path.length() == 2 && path.back() == ':')