fix zip/gzip bug
Closes PR 12605 original commit: f9247ff3a5a772c8a314a4c9444e449c5b113053
This commit is contained in:
parent
b2faf6534a
commit
a2ce5dbafd
|
@ -469,7 +469,8 @@
|
||||||
(longest_match-loop)))
|
(longest_match-loop)))
|
||||||
(define (*++scan)
|
(define (*++scan)
|
||||||
(set! scanpos (add1 scanpos))
|
(set! scanpos (add1 scanpos))
|
||||||
(bytes-ref window-vec scanpos))
|
(and (scanpos . < . window_size) ; the original C code can read past the end of the buffer
|
||||||
|
(bytes-ref window-vec scanpos)))
|
||||||
(define (*++match)
|
(define (*++match)
|
||||||
(set! matchpos (add1 matchpos))
|
(set! matchpos (add1 matchpos))
|
||||||
(bytes-ref window-vec matchpos))
|
(bytes-ref window-vec matchpos))
|
||||||
|
@ -479,7 +480,7 @@
|
||||||
(eq? (*++scan) (*++match)) (eq? (*++scan) (*++match))
|
(eq? (*++scan) (*++match)) (eq? (*++scan) (*++match))
|
||||||
(eq? (*++scan) (*++match)) (eq? (*++scan) (*++match))
|
(eq? (*++scan) (*++match)) (eq? (*++scan) (*++match))
|
||||||
(eq? (*++scan) (*++match)) (eq? (*++scan) (*++match))
|
(eq? (*++scan) (*++match)) (eq? (*++scan) (*++match))
|
||||||
(< scanpos strendpos))
|
(< scanpos strendpos))
|
||||||
(match-eight)))
|
(match-eight)))
|
||||||
|
|
||||||
(define (longest_match-loop)
|
(define (longest_match-loop)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user