From 522dac61b95cf09847cf55237e43bb8e4ccd7caf Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Wed, 11 Nov 2020 20:51:49 +0200 Subject: Fixed: Empty lines in the visited URLs file --- src/visited.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/visited.c') diff --git a/src/visited.c b/src/visited.c index b0b12beb..e9dc9b94 100644 --- a/src/visited.c +++ b/src/visited.c @@ -106,6 +106,7 @@ void load_Visited(iVisited *d, const char *dirPath) { iTime now; initCurrent_Time(&now); while (nextSplit_Rangecc(src, "\n", &line)) { + if (isEmpty_Range(&line)) continue; int y, m, D, H, M, S; sscanf(line.start, "%04d-%02d-%02dT%02d:%02d:%02d ", &y, &m, &D, &H, &M, &S); if (!y) break; @@ -147,6 +148,7 @@ static size_t find_Visited_(const iVisited *d, const iString *url) { } void visitUrl_Visited(iVisited *d, const iString *url) { + if (isEmpty_String(url)) return; iVisitedUrl visit; init_VisitedUrl(&visit); set_String(&visit.url, url); -- cgit v1.2.3