properly garble symbol names with multiple private import paths in them

pull/115/head
Andrew LeFevre 5 years ago
parent 446fa77c8f
commit 4864a7ac50

@ -186,15 +186,24 @@ func garbleSymbolName(symName string, privateImports []string, sb *strings.Build
}
func privateImportIndex(symName string, privateImports []string) (int, int) {
firstOff, l := -1, 0
for _, privateImport := range privateImports {
off := strings.Index(symName, privateImport)
if off == -1 {
continue
}
return off, len(privateImport)
if off < firstOff || firstOff == -1 {
firstOff = off
l = len(privateImport)
}
}
if firstOff == -1 {
return -1, 0
}
return -1, 0
return firstOff, l
}
func garbleSymData(data []byte, privateImports []string, dataTyp dataType, buf *bytes.Buffer) (b []byte) {

Loading…
Cancel
Save