]> code.citadel.org Git - citadel.git/blobdiff - textclient/routines.c
text client: if the 'who am i' command is used to populate the host name, strip the...
[citadel.git] / textclient / routines.c
index 56b4fd3375ae8f246172c2a1366b1c6d390689b9..6ef2978663fb1d67b999288d791fcddf4f5063ee 100644 (file)
@@ -490,6 +490,9 @@ void locate_host(CtdlIPC * ipc, char *hbuf) {
                return;
        }
        fgets(hbuf, SIZ, who);
+       if (hbuf[strlen(hbuf) - 1] == '\n') {
+               hbuf[strlen(hbuf) - 1] = 0;
+       }
        pclose(who);
        stripallbut(hbuf, '(', ')');
 }