From cd6758481797fe26ba36f59b06679918e56a8029 Mon Sep 17 00:00:00 2001 From: Callum Styan Date: Wed, 17 Jan 2018 22:46:22 -0800 Subject: [PATCH] we don't want to write to index file in older version formats --- index/index.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index/index.go b/index/index.go index e77dd8a3d..998f009d5 100644 --- a/index/index.go +++ b/index/index.go @@ -343,10 +343,7 @@ func (w *Writer) AddSymbols(sym map[string]struct{}) error { w.symbols = make(map[string]uint32, len(symbols)) for index, s := range symbols { - w.symbols[s] = uint32(w.pos) + headerSize + uint32(w.buf2.len()) - if w.Version == 2 { - w.symbols[s] = uint32(index) - } + w.symbols[s] = uint32(index) w.buf2.putUvarintStr(s) }