kinda fixes a port-position computation bug for custom binary ports.

This commit is contained in:
Abdulaziz Ghuloum 2008-07-24 22:30:21 -07:00
parent 7db56cf76e
commit f332927d23
2 changed files with 5 additions and 3 deletions

View File

@ -250,8 +250,10 @@
[(procedure? get-position)
(let ([pos (get-position)])
(if (or (fixnum? pos) (bignum? pos))
(+ pos index)
(error who "invalid returned value from getter" p)))]
(if (input-port? p)
(- pos (- ($port-size p) index))
(+ pos index))
(die who "invalid returned value from get-position" p)))]
[(eqv? get-position #f)
(+ (vector-ref pos-vec 0) index)]
[else

View File

@ -1 +1 @@
1551
1552