Browse Source

I'm dumb. Read-sequence destructively modifies the sequence rather than handing it back.

Brit Butler 13 years ago
parent
commit
1669746756
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/posts.lisp

+ 3 - 2
src/posts.lisp

@@ -55,8 +55,9 @@
55 55
          (parse-field (str)
56 56
            (nth-value 1 (cl-ppcre:scan-to-strings "[a-zA-Z]+: (.*)" str)))
57 57
          (slurp-remainder ()
58
-           (read-sequence (make-string (- (file-length in) (file-position in)))
59
-                          in :start (file-position in))))
58
+           (let ((seq (make-string (- (file-length in) (file-position in)))))
59
+             (read-sequence seq in)
60
+             (remove #\Nul seq))))
60 61
     (check-header)
61 62
     (let ((args (loop for field in '("title" "tags" "date" "format")
62 63
                    for line = (read-line in nil)