diff options
Diffstat (limited to 'src/compress/flate/dict_decoder.go')
-rw-r--r-- | src/compress/flate/dict_decoder.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compress/flate/dict_decoder.go b/src/compress/flate/dict_decoder.go index 71c75a065e..3b59d48351 100644 --- a/src/compress/flate/dict_decoder.go +++ b/src/compress/flate/dict_decoder.go @@ -160,10 +160,8 @@ func (dd *dictDecoder) tryWriteCopy(dist, length int) int { srcPos := dstPos - dist // Copy possibly overlapping section before destination position. -loop: - dstPos += copy(dd.hist[dstPos:endPos], dd.hist[srcPos:dstPos]) - if dstPos < endPos { - goto loop // Avoid for-loop so that this function can be inlined + for dstPos < endPos { + dstPos += copy(dd.hist[dstPos:endPos], dd.hist[srcPos:dstPos]) } dd.wrPos = dstPos |