Skip to content

Commit

Permalink
Merge pull request #1 from Kloen/bugfix/checksum-already-consumed-can…
Browse files Browse the repository at this point in the history
…t-be-returned-as-found

fix: Don't return as completed a read if the checksum has already been consumed
  • Loading branch information
lico-n authored Jan 31, 2023
2 parents 4f56347 + 961e316 commit 036ba91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extract_with_checksum.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ func (c *checksumCompleteCond) Complete(neko *nekoData, uncompressed []byte) boo
chSum := crc32.ChecksumIEEE(uncompressed)

for _, v := range c.maps {
if _, ok := v.checksums[chSum]; ok {
return true
if n, ok := v.checksums[chSum]; ok {
return n > 0
}
}

Expand Down

0 comments on commit 036ba91

Please sign in to comment.