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) }