summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clients/znol/znol.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/clients/znol/znol.c b/clients/znol/znol.c
index 9573191..9bc6764 100644
--- a/clients/znol/znol.c
+++ b/clients/znol/znol.c
@@ -142,8 +142,9 @@ main(argc,argv)
*comment_ptr = '\0'; /* Ignore from # onwards */
/* Get rid of old-style nol entries, just in case */
cp = cleanname + strlen(cleanname) - 1;
- *cp = '\0';
- while(*--cp == ' ')
+ if (*cp == '\n')
+ *cp = '\0';
+ while (*--cp == ' ')
*cp = '\0';
if (*cleanname == '@' || !*cleanname)
continue;