we don't want to write to index file in older version formats

This commit is contained in:
Callum Styan 2018-01-17 22:46:22 -08:00
parent 87a9415bf1
commit cd67584817
1 changed files with 1 additions and 4 deletions

View File

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