From c99a44b122de5ae767763ee849bf730c5b666205 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Wed, 25 Jan 2017 13:25:39 +0100 Subject: [PATCH] Fix Random() function --- src/restic/test/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/restic/test/helpers.go b/src/restic/test/helpers.go index 072cc4db9..4e19000e8 100644 --- a/src/restic/test/helpers.go +++ b/src/restic/test/helpers.go @@ -79,7 +79,7 @@ func Random(seed, count int) []byte { for j := range data { cur := i + j - if len(p) >= cur { + if cur >= len(p) { break } p[cur] = data[j]