From b8b09ce0d85e6d413cbd23cf4f4a1ea58be5065d Mon Sep 17 00:00:00 2001 From: Michael Cross Date: Tue, 21 Jul 2015 17:38:53 +0100 Subject: [PATCH] Don't reduce size of buffer in bcjX86Filter Fixes #3 --- dec_bcj.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dec_bcj.go b/dec_bcj.go index 4afe9eb..1b7a695 100644 --- a/dec_bcj.go +++ b/dec_bcj.go @@ -88,8 +88,7 @@ func bcjX86Filter(s *xzDecBCJ, buf []byte) int { if len(buf) <= 4 { return 0 } - buf = buf[:len(buf)-4] - for i = 0; i < len(buf); i++ { + for i = 0; i < len(buf)-4; i++ { if buf[i]&0xfe != 0xe8 { continue }