summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--parse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 8ea90f8..40f7a25 100644
--- a/parse.c
+++ b/parse.c
@@ -48,6 +48,7 @@ size_t scatss(char *buf, size_t i, size_t n, strv_t ss) {
 }
 
 int parse_gophermap_line(struct doc *d, strv_t ln) {
+	if (ln.n == 1 && ln.s[0] == '.') return 1;
 	char url[512] = "gopher://";
 	size_t urln = 9;
 	struct {
@@ -63,8 +64,6 @@ int parse_gophermap_line(struct doc *d, strv_t ln) {
 	strv_split(&ln, '\t', &bits.host);
 	strv_split(&ln, '\t', &bits.port);
 	switch (bits.item_type) {
-	case '.':
-		if (ln.n == 1) return 1;
 	default:
 		urln = scatss(url, urln, sizeof url, bits.host);
 		if (urln < sizeof url) url[urln++] = ':';