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

This commit is contained in:
Brit Butler 2012-08-22 17:08:03 -04:00
parent 0837833c14
commit 1669746756

View file

@ -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)