Index: src/0dev.org/predictor/predictor.go ================================================================== --- src/0dev.org/predictor/predictor.go +++ src/0dev.org/predictor/predictor.go @@ -139,12 +139,11 @@ if len(ctx.input) > 0 { readCount = copy(output, ctx.input) // Check whether we still have leftover data in the buffer :) if readCount < len(ctx.input) { - copy(ctx.input[:readCount], ctx.input[readCount:]) - ctx.input = ctx.input[:readCount] + ctx.input = ctx.input[:copy(ctx.input, ctx.input[readCount:])] } return readCount, nil } // This is single-iteration only but it is fine according to io.Reader's contract ?!