Fixes bug 173170: bytevector-copy! precondition error

This commit is contained in:
Abdulaziz Ghuloum 2007-12-01 01:43:37 -05:00
parent 9651a717cf
commit d85466ab75
2 changed files with 3 additions and 3 deletions

View File

@ -560,10 +560,10 @@
[(not (bytevector? dst)) [(not (bytevector? dst))
(error 'bytevector-copy! "not a bytevector" dst)] (error 'bytevector-copy! "not a bytevector" dst)]
[(let ([n ($fx+ src-start k)]) [(let ([n ($fx+ src-start k)])
(or ($fx< n 0) ($fx>= n ($bytevector-length src)))) (or ($fx< n 0) ($fx> n ($bytevector-length src))))
(error 'bytevector-copy! "out of range" src-start k)] (error 'bytevector-copy! "out of range" src-start k)]
[(let ([n ($fx+ dst-start k)]) [(let ([n ($fx+ dst-start k)])
(or ($fx< n 0) ($fx>= n ($bytevector-length dst)))) (or ($fx< n 0) ($fx> n ($bytevector-length dst))))
(error 'bytevector-copy! "out of range" dst-start k)] (error 'bytevector-copy! "out of range" dst-start k)]
[(eq? src dst) [(eq? src dst)
(cond (cond

View File

@ -1 +1 @@
1154 1155