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) 
 | 
			
		||||
             (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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue