diff options
-rwxr-xr-x | qotd.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qotd.scm b/qotd.scm index 394085d..da3aba8 100755 --- a/qotd.scm +++ b/qotd.scm | |||
@@ -47,7 +47,8 @@ An implementation of the QOTD protocol (RFC 865) | |||
47 | #f)) | 47 | #f)) |
48 | 48 | ||
49 | (define (ensure-final-newline str) | 49 | (define (ensure-final-newline str) |
50 | (cond ((char=? (string-ref str (- (string-length str) 1)) #\newline) str) | 50 | (cond ((not str) "\n") |
51 | ((char=? (string-ref str (- (string-length str) 1)) #\newline) str) | ||
51 | (else (string-append str "\n")))) | 52 | (else (string-append str "\n")))) |
52 | 53 | ||
53 | (define (main arguments) | 54 | (define (main arguments) |