fixed importpath symbols not getting garbled

pull/115/head
Andrew LeFevre 5 years ago
parent 6890c11d5c
commit 3534210e7f

@ -357,10 +357,15 @@ func isSymbol(c byte) bool {
} }
func garbleSymData(data []byte, privateImports []string, dataTyp dataType, buf *bytes.Buffer) (b []byte) { func garbleSymData(data []byte, privateImports []string, dataTyp dataType, buf *bytes.Buffer) (b []byte) {
symData := data var symData []byte
if dataTyp == namedata { switch dataTyp {
case importPath:
symData = data[3:]
case namedata:
oldNameLen := int(uint16(data[1])<<8 | uint16(data[2])) oldNameLen := int(uint16(data[1])<<8 | uint16(data[2]))
symData = data[3 : 3+oldNameLen] symData = data[3 : 3+oldNameLen]
default:
symData = data
} }
var off int var off int

Loading…
Cancel
Save