mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-02 22:57:04 -05:00
Merge pull request #1088 from gucio321/hotfix2
d2dat: fixed encoder bug (make(..., nonzero) and append later)
This commit is contained in:
commit
54745a215b
@ -26,7 +26,7 @@ func Load(data []byte) (d2interface.Palette, error) {
|
||||
|
||||
// Marshal encodes data palette back into byte slice
|
||||
func (p *DATPalette) Marshal() []byte {
|
||||
result := make([]byte, len(p.colors))
|
||||
result := make([]byte, 0)
|
||||
|
||||
for _, i := range &p.colors {
|
||||
result = append(result, i.B(), i.G(), i.R())
|
||||
|
Loading…
Reference in New Issue
Block a user