kinda fixes a port-position computation bug for custom binary ports.
This commit is contained in:
+4
-2
@@ -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
|
||||
|
||||
@@ -1 +1 @@
|
||||
1551
|
||||
1552
|
||||
|
||||
Reference in New Issue
Block a user