mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-06-20 06:05:23 +00: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