aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/fbrun/FbRun.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc
index 5404e69..0f8ff63 100644
--- a/util/fbrun/FbRun.cc
+++ b/util/fbrun/FbRun.cc
@@ -508,8 +508,8 @@ void FbRun::tabCompleteApps() {
508 first_run = false; 508 first_run = false;
509 std::string path = getenv("PATH"); 509 std::string path = getenv("PATH");
510 FbTk::Directory dir; 510 FbTk::Directory dir;
511 for (unsigned int l = 0, r = 0; r < path.size(); ++r) { 511 for (unsigned int l = 0, r = 0; r <= path.size(); ++r) {
512 if ((path.at(r) == ':' || r == path.size() - 1) && r - l > 1) { 512 if ((r == path.size() || path.at(r) == ':') && r - l > 1) {
513 dir.open(path.substr(l, r - l).c_str()); 513 dir.open(path.substr(l, r - l).c_str());
514 prefix = dir.name() + (*dir.name().rbegin() == '/' ? "" : "/"); 514 prefix = dir.name() + (*dir.name().rbegin() == '/' ? "" : "/");
515 int n = dir.entries(); 515 int n = dir.entries();