commit b99797326c05b7817d94a17bec997266d023b1c7
parent c4cb8053a0fffcd4f4ef2a9f333539e06fa872ad
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 15 Jul 2020 19:43:57 +0200
pedantic fix when an item has an invalid timestamp and time-travelling
... back to 1970-01-01 (ts = 0).
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sfeed_curses.c b/sfeed_curses.c
@@ -983,6 +983,7 @@ linetoitem(char *line, struct item *item)
char *fields[FieldLast];
time_t parsedtime;
+ item->line = line;
parseline(line, fields);
parsedtime = 0;
@@ -994,8 +995,7 @@ linetoitem(char *line, struct item *item)
item->timeok = 0;
}
- item->line = line;
- item->isnew = (parsedtime >= comparetime);
+ item->isnew = (item->timeok && parsedtime >= comparetime);
memcpy(item->fields, fields, sizeof(fields));
return 0;