aboutsummaryrefslogtreecommitdiffstats
path: root/skate
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-05-20 18:42:52 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-05-20 18:42:52 +0200
commitfdac7d351972754c018267682a63e13908314f68 (patch)
tree7329c4ef31bbce115e12217d47253cc6eec113ae /skate
parentb5a6022b0bbd8e1d65adcd1f2e5d935b28b2a71a (diff)
downloadrefcat-fdac7d351972754c018267682a63e13908314f68.tar.gz
refcat-fdac7d351972754c018267682a63e13908314f68.zip
off-by-one
Diffstat (limited to 'skate')
-rw-r--r--skate/zippy.go6
1 files changed, 3 insertions, 3 deletions
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)