Skip to content
Browse files

read-file: properly deal with formats where (not (eql byte-lenght cha…

…racter-length))
  • Loading branch information...
1 parent 90d4c9b commit bf6879c97f70ae6febfbf93e252ff0bc3996fb13 Attila Lendvai committed May 26, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 swank-source-file-cache.lisp
View
6 swank-source-file-cache.lisp
@@ -81,9 +81,9 @@ Return NIL if the right version cannot be found."
:external-format (or (guess-external-format filename)
(find-external-format "latin-1")
:default))
- (let ((string (make-string (file-length s))))
- (read-sequence string s)
- string)))
+ (let* ((string (make-string (file-length s)))
+ (length (read-sequence string s)))
+ (subseq string 0 length))))
;;;; Snippets

0 comments on commit bf6879c

Please sign in to comment.
Something went wrong with that request. Please try again.