Skip to content

Commit

Permalink
Fix exit condition
Browse files Browse the repository at this point in the history
  • Loading branch information
flanglet committed Feb 16, 2020
1 parent a71391b commit e1f7f8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion function/LZCodec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit e1f7f8d

Please sign in to comment.