From f52e6ea3aa61a7d6df879681ebbaff96ee074a7f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 17 Apr 2016 10:20:35 -0400 Subject: [PATCH] Database: Modified ::lastLine to keep walking until it finds one --- src/Database.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Database.cpp b/src/Database.cpp index 3ffbfb9f..4079d74e 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -64,11 +64,16 @@ std::vector Database::files () const //////////////////////////////////////////////////////////////////////////////// // Walk backwards through the files until an interval is found. +// Note: Not an exclusion. std::string Database::lastLine () { std::vector ::reverse_iterator ri; for (ri = _files.rbegin (); ri != _files.rend (); ri++) - return ri->lastLine (); + { + auto line = ri->lastLine (); + if (line != "") + return line; + } return ""; }