From f6761a7e3d654b0cbd5c38f81a3721e4e4c4a306 Mon Sep 17 00:00:00 2001 From: Arpad Ryszka Date: Thu, 27 Jul 2017 02:18:19 +0200 Subject: [PATCH] fix storage allocation --- store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store.go b/store.go index d3d90ce..515a324 100644 --- a/store.go +++ b/store.go @@ -52,7 +52,7 @@ func (s *store) ensureOffset(offset int) { } s.match = s.match[:cap(s.match)] - for i := cap(s.match); i <= offset; i++ { + for i := len(s.match); i <= offset; i++ { s.match = append(s.match, nil) } }