From 27112fec4e4fe12b432661f507a2c64719cefed5 Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Sun, 24 May 2009 12:49:53 +0300 Subject: [PATCH] fixed bug that produced an incorrect assertion violation for (put-bytevector! port bv i j) where i = (bytevector-length bv). Thanks to Andreas Rottmann. --- scheme/ikarus.io.ss | 4 ++-- scheme/last-revision | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scheme/ikarus.io.ss b/scheme/ikarus.io.ss index 2971628..e520b73 100644 --- a/scheme/ikarus.io.ss +++ b/scheme/ikarus.io.ss @@ -2267,7 +2267,7 @@ (if (bytevector? bv) (if (fixnum? i) (let ([n (bytevector-length bv)]) - (if (and (fx< i n) (fx>= i 0)) + (if (and (fx<= i n) (fx>= i 0)) ($put-bytevector p bv i (fx- n i)) (die 'put-bytevector "index out of range" i))) (die 'put-bytevector "invalid index" i)) @@ -2276,7 +2276,7 @@ (if (bytevector? bv) (if (fixnum? i) (let ([n (bytevector-length bv)]) - (if (and (fx< i n) (fx>= i 0)) + (if (and (fx<= i n) (fx>= i 0)) (if (fixnum? c) (if (and (fx>= c 0) (fx>= (fx- n c) i)) ($put-bytevector p bv i c) diff --git a/scheme/last-revision b/scheme/last-revision index 197a77e..0fbe6bb 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1788 +1789