mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-10-01 15:46:17 -04:00
d2dat: fixed encoder bug (make(..., nonzero) and append later)
This commit is contained in:
parent
fbd675c076
commit
7b77011977
@ -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