X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1d4977afe4282d300f0f34e68974f4ef211ac769..e8fe77294085e66b09cbb8043458f22b5b2ef1e6:/sbr/ruserpass.c diff --git a/sbr/ruserpass.c b/sbr/ruserpass.c index bc24f520..de0f951b 100644 --- a/sbr/ruserpass.c +++ b/sbr/ruserpass.c @@ -148,7 +148,7 @@ ruserpass(char *host, char **aname, char **apass) if (fgets(tmp, sizeof(tmp) - 1, stdin) == NULL) { advise ("tmp", "fgets"); } - tmp[strlen(tmp) - 1] = '\0'; + TrimSuffixC(tmp, '\n'); if (*tmp != '\0' || myname == NULL) { myname = tmp; }