diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-11 20:51:49 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-11 20:51:49 +0200 |
commit | 522dac61b95cf09847cf55237e43bb8e4ccd7caf (patch) | |
tree | 2e56f3fc4c7da60eb08df513601123dbcb4a0fcb /src/visited.c | |
parent | 388db8ab697cc62327bbe3b89148493e9307ded5 (diff) |
Fixed: Empty lines in the visited URLs file
Diffstat (limited to 'src/visited.c')
-rw-r--r-- | src/visited.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { | |||
106 | iTime now; | 106 | iTime now; |
107 | initCurrent_Time(&now); | 107 | initCurrent_Time(&now); |
108 | while (nextSplit_Rangecc(src, "\n", &line)) { | 108 | while (nextSplit_Rangecc(src, "\n", &line)) { |
109 | if (isEmpty_Range(&line)) continue; | ||
109 | int y, m, D, H, M, S; | 110 | int y, m, D, H, M, S; |
110 | sscanf(line.start, "%04d-%02d-%02dT%02d:%02d:%02d ", &y, &m, &D, &H, &M, &S); | 111 | sscanf(line.start, "%04d-%02d-%02dT%02d:%02d:%02d ", &y, &m, &D, &H, &M, &S); |
111 | if (!y) break; | 112 | if (!y) break; |
@@ -147,6 +148,7 @@ static size_t find_Visited_(const iVisited *d, const iString *url) { | |||
147 | } | 148 | } |
148 | 149 | ||
149 | void visitUrl_Visited(iVisited *d, const iString *url) { | 150 | void visitUrl_Visited(iVisited *d, const iString *url) { |
151 | if (isEmpty_String(url)) return; | ||
150 | iVisitedUrl visit; | 152 | iVisitedUrl visit; |
151 | init_VisitedUrl(&visit); | 153 | init_VisitedUrl(&visit); |
152 | set_String(&visit.url, url); | 154 | set_String(&visit.url, url); |