diff --git a/function/LZCodec.go b/function/LZCodec.go index a55babae..58c4978b 100644 --- a/function/LZCodec.go +++ b/function/LZCodec.go @@ -608,7 +608,7 @@ func (this *LZPCodec) Forward(src, dst []byte) (uint, uint, error) { var err error - if (srcIdx != count) || (dstIdx < (count - count>>6)) { + if (srcIdx != count) || (dstIdx >= count-(count>>6)) { err = errors.New("LZP forward transform failed: output buffer too small") }