Skip to content

Commit

Permalink
Fix more compat with go1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
kivutar committed Nov 14, 2019
1 parent 520ad7f commit 485bb68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions patch/ups.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ func applyUPS(patchData, sourceData []byte) (*[]byte, error) {
func checks(patch, source, target *file, sourceReadLength, targetReadLength int) error {
var sourceReadChecksum uint32
for i := 0; i < 4; i++ {
sourceReadChecksum |= uint32(upsRead(patch)) << (i * 8)
sourceReadChecksum |= uint32(upsRead(patch)) << uint32(i*8)
}
var targetReadChecksum uint32
for i := 0; i < 4; i++ {
targetReadChecksum |= uint32(upsRead(patch)) << (i * 8)
targetReadChecksum |= uint32(upsRead(patch)) << uint32(i*8)
}

patchResultChecksum := ^patch.Checksum
Expand All @@ -130,7 +130,7 @@ func checks(patch, source, target *file, sourceReadLength, targetReadLength int)

var patchReadChecksum uint32
for i := 0; i < 4; i++ {
patchReadChecksum |= uint32(upsRead(patch)) << (i * 8)
patchReadChecksum |= uint32(upsRead(patch)) << uint32(i*8)
}

if patchResultChecksum != patchReadChecksum {
Expand Down

0 comments on commit 485bb68

Please sign in to comment.