From fdac7d351972754c018267682a63e13908314f68 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 20 May 2021 18:42:52 +0200 Subject: off-by-one --- skate/zippy.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'skate') diff --git a/skate/zippy.go b/skate/zippy.go index 2e9ead0..bc65281 100644 --- a/skate/zippy.go +++ b/skate/zippy.go @@ -120,7 +120,7 @@ func ZippyVerifyRefs(releases, refs io.Reader, w io.Writer) error { // biblioref. var ( enc = json.NewEncoder(w) - keyer = makeKeyFunc("\t", 2) + keyer = makeKeyFunc("\t", 1) grouper = func(g *zipkey.Group) error { var ( re, pivot *Release @@ -129,11 +129,11 @@ func ZippyVerifyRefs(releases, refs io.Reader, w io.Writer) error { if len(g.G0) == 0 || len(g.G1) == 0 { return nil } - if pivot, err = stringToRelease(cut(g.G0[0], "\t", 3)); err != nil { + if pivot, err = stringToRelease(cut(g.G0[0], "\t", 2)); err != nil { return err } for _, line := range g.G1 { - if re, err = stringToRelease(cut(line, "\t", 3)); err != nil { + if re, err = stringToRelease(cut(line, "\t", 2)); err != nil { return err } result := Verify(pivot, re) -- cgit v1.2.3