X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffd-stream.lisp;h=753012881470e66e50042b9d7a57e03c82e8b3ce;hb=15d6e7c9a2c3234f95dfe278046fa2fee1b0c007;hp=d8a2d5799d90e36d7c54a022c9e796c0dd95d90d;hpb=96a1badea2523bf188f7ba023e2f69a6785847d6;p=sbcl.git diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index d8a2d57..7530128 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -671,7 +671,9 @@ do (setf result (+ (* 256 result) (sap-ref-8 sap (+ head j)))) - finally (return (dpb result (byte i 0) -1)))))) + finally (return (if (logbitp (1- i) result) + (dpb result (byte i 0) -1) + result)))))) `(signed-byte ,i) (/ i 8)))))