Skip to content

Commit a04d532

Browse files
committed
hex instad of int representation of symbols
1 parent 8380d0d commit a04d532

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

main.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ func init() {
114114

115115
func main() {
116116
if mode == "build" {
117+
fmt.Println("Building list of files to package...")
117118
files, err := scanPackageFiles()
118119
if err != nil {
119120
fmt.Printf("failed to scan %s", inputDir)
@@ -558,14 +559,17 @@ func scanPackageFiles() ([][]newFile, error) {
558559
if err != nil {
559560
return err
560561
}
561-
newFile.TypeSymbol, err = strconv.ParseInt(dir2, 10, 64)
562+
uintTypeSymbol, err := strconv.ParseUint(dir2[2:], 16, 64)
562563
if err != nil {
563564
return err
564565
}
565-
newFile.FileSymbol, err = strconv.ParseInt(dir3, 10, 64)
566+
newFile.TypeSymbol = int64(uintTypeSymbol)
567+
uintFileSymbol, err := strconv.ParseUint(dir3[2:], 16, 64)
566568
if err != nil {
567569
return err
568570
}
571+
newFile.FileSymbol = int64(uintFileSymbol)
572+
569573
files[chunkNum] = append(files[chunkNum], newFile)
570574
return nil
571575
})
@@ -628,8 +632,8 @@ func extractFilesFromPackage(fullManifest evrm.EvrManifest) error {
628632
if v2.FileIndex != uint32(k) {
629633
continue
630634
}
631-
fileName := strconv.FormatInt(v2.FileSymbol, 10)
632-
fileType := strconv.FormatInt(v2.T, 10)
635+
fileName := "0x" + strconv.FormatUint(uint64(v2.FileSymbol), 16)
636+
fileType := "0x" + strconv.FormatUint(uint64(v2.T), 16)
633637
basePath := fmt.Sprintf("%s/%s", outputDir, fileType)
634638
if outputPreserveGroups {
635639
basePath = fmt.Sprintf("%s/%d/%s", outputDir, v2.FileIndex, fileType)

0 commit comments

Comments
 (0)