tFix initial URI search string parsing - sacc - sacc (saccomys): simple gopher client.
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 250ea3842c49c0f1b8224a607e5a4d7fd5dd7ae3
 (DIR) parent 7bd48fa9930dca90e24e17b78b451b014ae287e8
 (HTM) 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:
         M sacc.c                              |       5 ++---
       
       1 file changed, 2 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/sacc.c b/sacc.c
       t@@ -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';
                        }