diff options
author | Dan Winship <danw@mit.edu> | 1997-05-12 16:23:26 +0000 |
---|---|---|
committer | Dan Winship <danw@mit.edu> | 1997-05-12 16:23:26 +0000 |
commit | a892ed58ff0bface370b3f440454dc6006ed2f25 (patch) | |
tree | f23ce4f6d7a784fc03d55fe507f2706dfb3ef6f8 /clients | |
parent | 6118b00de49db4f85351d27f824fb608c7b798b4 (diff) |
DTRT if .anyone doesn't have a final newline
Diffstat (limited to 'clients')
-rw-r--r-- | clients/znol/znol.c | 5 |
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; |