summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2020-05-13 19:27:14 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2020-05-13 19:27:14 +0200
commit414b896c2de449718169fab200b39e0851c2742a (patch)
tree7189184e9b50bdabdc78af9904ad7852a1eeb1f5
parentf1e17c612e33790a390c1ee1329c8433017d0c44 (diff)
sfeed_gopher: if a gopher url cannot be parsed then show it anyway as a "URL:"
This should never be able to happen though in practise because sfeed parses the uri aswell.
-rw-r--r--sfeed_gopher.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sfeed_gopher.c b/sfeed_gopher.c
index 93e2e61..74c0a71 100644
--- a/sfeed_gopher.c
+++ b/sfeed_gopher.c
@@ -72,9 +72,8 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f)
if (fields[FieldLink][0]) {
itemtype = 'h';
- if (!strncmp(fields[FieldLink], "gopher://", 9)) {
- if (parseuri(fields[FieldLink], &u, 0) == -1)
- continue;
+ if (!strncmp(fields[FieldLink], "gopher://", 9) &&
+ parseuri(fields[FieldLink], &u, 0) != -1) {
itemhost = u.host;
itemport = u.port[0] ? u.port : "70";
itemtype = '1';