Corrected reda-ascii-line :CR and :LF detection.

Pascal J. Bourguignon [2019-08-29 00:07]
Corrected reda-ascii-line :CR and :LF detection.
Filename
common-lisp/cesarum/ascii.lisp
diff --git a/common-lisp/cesarum/ascii.lisp b/common-lisp/cesarum/ascii.lisp
index 462bb08..4e283f5 100644
--- a/common-lisp/cesarum/ascii.lisp
+++ b/common-lisp/cesarum/ascii.lisp
@@ -505,11 +505,11 @@ newline:  (member :crlf :cr :lf) ; the defaultl is :CRLF since that's what's
                       (decf (fill-pointer buffer) 2)
                       (return-from read-ascii-line buffer)))
            ((:cr)   (when (and (< 1 (length buffer))
-                               (= cr (aref buffer (- (length buffer) 2))))
+                               (= cr (aref buffer (- (length buffer) 1))))
                       (decf (fill-pointer buffer))
                       (return-from read-ascii-line buffer)))
            ((:lf)   (when (and (< 1 (length buffer))
-                               (= lf (aref buffer (- (length buffer) 2))))
+                               (= lf (aref buffer (- (length buffer) 1))))
                       (decf (fill-pointer buffer))
                       (return-from read-ascii-line buffer))))
      :finally (cond
ViewGit