diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2020-10-06 18:45:54 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2020-10-09 11:27:06 +0200 |
commit | 3a5295f595acee81170565ba0405a64d7110a229 (patch) | |
tree | a6b992a81a220e8385e26654adc0f40596b7ec97 | |
parent | 08add9b95e58bc4e7ece8137efe8dc0905a94467 (diff) |
fix counting due to uninitialized variable when the time could not be parsed
Since commit 276d5789fd91d1cbe84b7baee736dea28b1e04c0 if the time is empty or
could not be parsed then it is shown/aligned as a blank space instead of being
skipped.
An oversight in this change was that items should be counted and set in
`isnew`.
This commit fixes the uninitialized variable and possible miscounting.
-rw-r--r-- | sfeed_frames.c | 1 | ||||
-rw-r--r-- | sfeed_html.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sfeed_frames.c b/sfeed_frames.c index bb55c31..ed06397 100644 --- a/sfeed_frames.c +++ b/sfeed_frames.c @@ -50,6 +50,7 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min); } else { + isnew = 0; fputs(" ", fpitems); } f->total++; diff --git a/sfeed_html.c b/sfeed_html.c index 42e6572..911a01b 100644 --- a/sfeed_html.c +++ b/sfeed_html.c @@ -51,6 +51,7 @@ printfeed(FILE *fp, struct feed *f) tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min); } else { + isnew = 0; fputs(" ", stdout); } f->total++; |