diff --git a/d2common/d2fileformats/d2mpq/hash_entry_map.go b/d2common/d2fileformats/d2mpq/hash_entry_map.go index cdd42d2a..ab9c0ca1 100644 --- a/d2common/d2fileformats/d2mpq/hash_entry_map.go +++ b/d2common/d2fileformats/d2mpq/hash_entry_map.go @@ -2,16 +2,16 @@ package d2mpq // HashEntryMap represents a hash entry map type HashEntryMap struct { - entries map[uint64]*HashTableEntry + entries map[uint64]HashTableEntry } // Insert inserts a hash entry into the table func (hem *HashEntryMap) Insert(entry *HashTableEntry) { if hem.entries == nil { - hem.entries = make(map[uint64]*HashTableEntry) + hem.entries = make(map[uint64]HashTableEntry) } - hem.entries[uint64(entry.NamePartA)<<32|uint64(entry.NamePartB)] = entry + hem.entries[uint64(entry.NamePartA)<<32|uint64(entry.NamePartB)] = *entry } // Find finds a hash entry @@ -25,7 +25,7 @@ func (hem *HashEntryMap) Find(fileName string) (*HashTableEntry, bool) { entry, found := hem.entries[uint64(hashA)<<32|uint64(hashB)] - return entry, found + return &entry, found } // Contains returns true if the hash entry contains the values diff --git a/go.mod b/go.mod index 6f3308f4..8d641cf5 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect github.com/go-restruct/restruct v0.0.0-20191227155143-5734170a48a1 - github.com/hajimehoshi/ebiten v1.12.0-alpha.5.0.20200627174955-aea4630b5f84 + github.com/hajimehoshi/ebiten v1.12.0-alpha.6.0.20200629133528-780465b702ce github.com/pkg/profile v1.5.0 github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff github.com/satori/go.uuid v1.2.0 diff --git a/go.sum b/go.sum index 2354786e..b0b6524c 100644 --- a/go.sum +++ b/go.sum @@ -21,6 +21,8 @@ github.com/hajimehoshi/ebiten v1.11.2 h1:4oixxPh5DuSNlmL/Q4LIOGFXCY8uLC+pcxOnqAG github.com/hajimehoshi/ebiten v1.11.2/go.mod h1:aDEhx0K9gSpXw3Cxf2hCXDxPSoF8vgjNqKxrZa/B4Dg= github.com/hajimehoshi/ebiten v1.12.0-alpha.5.0.20200627174955-aea4630b5f84 h1:BRvyD5kF4r9JGWd3xwBgQNpRhBDzvmAEXP2tv1MGjHA= github.com/hajimehoshi/ebiten v1.12.0-alpha.5.0.20200627174955-aea4630b5f84/go.mod h1:8vzUI4e0fBkbONYOY4WJN/qikY2zv/VG6kFTzJ0B//o= +github.com/hajimehoshi/ebiten v1.12.0-alpha.6.0.20200629133528-780465b702ce h1:cEKWqbtxFremkIRhJxz0Z80wXqNNe8ZNk6ra8XASC1I= +github.com/hajimehoshi/ebiten v1.12.0-alpha.6.0.20200629133528-780465b702ce/go.mod h1:8vzUI4e0fBkbONYOY4WJN/qikY2zv/VG6kFTzJ0B//o= github.com/hajimehoshi/go-mp3 v0.2.1/go.mod h1:Rr+2P46iH6PwTPVgSsEwBkon0CK5DxCAeX/Rp65DCTE= github.com/hajimehoshi/go-mp3 v0.3.0/go.mod h1:qMJj/CSDxx6CGHiZeCgbiq2DSUkbK0UbtXShQcnfyMM= github.com/hajimehoshi/oto v0.3.4/go.mod h1:PgjqsBJff0efqL2nlMJidJgVJywLn6M4y8PI4TfeWfA=