kinda fixes a port-position computation bug for custom binary ports.
This commit is contained in:
parent
7db56cf76e
commit
f332927d23
|
@ -250,8 +250,10 @@
|
||||||
[(procedure? get-position)
|
[(procedure? get-position)
|
||||||
(let ([pos (get-position)])
|
(let ([pos (get-position)])
|
||||||
(if (or (fixnum? pos) (bignum? pos))
|
(if (or (fixnum? pos) (bignum? pos))
|
||||||
(+ pos index)
|
(if (input-port? p)
|
||||||
(error who "invalid returned value from getter" p)))]
|
(- pos (- ($port-size p) index))
|
||||||
|
(+ pos index))
|
||||||
|
(die who "invalid returned value from get-position" p)))]
|
||||||
[(eqv? get-position #f)
|
[(eqv? get-position #f)
|
||||||
(+ (vector-ref pos-vec 0) index)]
|
(+ (vector-ref pos-vec 0) index)]
|
||||||
[else
|
[else
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1551
|
1552
|
||||||
|
|
Loading…
Reference in New Issue