From 1669746756e1003d22c76b78040a827cd6f864b8 Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Wed, 22 Aug 2012 17:08:03 -0400 Subject: [PATCH] I'm dumb. Read-sequence destructively modifies the sequence rather than handing it back. --- src/posts.lisp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/posts.lisp b/src/posts.lisp index ba9c06a..4a12e80 100644 --- a/src/posts.lisp +++ b/src/posts.lisp @@ -55,8 +55,9 @@ (parse-field (str) (nth-value 1 (cl-ppcre:scan-to-strings "[a-zA-Z]+: (.*)" str))) (slurp-remainder () - (read-sequence (make-string (- (file-length in) (file-position in))) - in :start (file-position in)))) + (let ((seq (make-string (- (file-length in) (file-position in))))) + (read-sequence seq in) + (remove #\Nul seq)))) (check-header) (let ((args (loop for field in '("title" "tags" "date" "format") for line = (read-line in nil)