Skip to content

Commit

Permalink
Fixed gigantic error message in some cases when a find value is not f…
Browse files Browse the repository at this point in the history
…ound
  • Loading branch information
pgaskin committed Jul 17, 2019
1 parent a27863f commit 7ff60c4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion patchlib/patcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ func (p *Patcher) replaceValue(offset int32, find, replace interface{}, strictOf
}

if strictOffset && !bytes.HasPrefix(p.buf[p.cur+offset:], fbuf) {
fmt.Printf("%x -> %x (%x)[%x]{%d} {%v, %v, %v}\n", fbuf, rbuf, p.buf, p.buf[p.cur+offset:], p.cur+offset, find, replace, offset)
return errors.New("could not find specified bytes at offset")
}

Expand Down

0 comments on commit 7ff60c4

Please sign in to comment.