From dff9606216920e8d12cfda4b95ed9ed4e3ea4159 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Sat, 4 Jun 2022 08:45:39 +0200 Subject: [PATCH] Fix out-of-bounds. --- src/gui/FileListWidget.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/FileListWidget.cxx b/src/gui/FileListWidget.cxx index 272fc396c..e4acdc227 100644 --- a/src/gui/FileListWidget.cxx +++ b/src/gui/FileListWidget.cxx @@ -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() == ':')