sacc

sacc(omys), simple console gopher client (mirror)
git clone https://git.parazyd.org/sacc
Log | Files | Refs | LICENSE

commit 250ea3842c49c0f1b8224a607e5a4d7fd5dd7ae3
parent 7bd48fa9930dca90e24e17b78b451b014ae287e8
Author: Quentin Rameau <quinq@fifth.space>
Date:   Tue, 29 Oct 2019 00:24:07 +0100

Fix initial URI search string parsing

Thanks to Hiltjo for spotting this!

Diffstat:
Msacc.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sacc.c b/sacc.c @@ -922,12 +922,11 @@ moldentry(char *url) entry->type = gopherpath[0]; entry->username = entry->selector = ++gopherpath; if (entry->type == '7') { - p = gopherpath; - if (p = strstr(p, "%09")) { + if (p = strstr(gopherpath, "%09")) { memmove(p+1, p+3, strlen(p+3)+1); *p = '\t'; } - if (p = strchr(p, '\t')) { + if (p || (p = strchr(gopherpath, '\t'))) { asprintf(&entry->tag, "%s", gopherpath); *p = '\0'; }