1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-07-01 11:25:26 +00:00

Merge pull request #1088 from gucio321/hotfix2

d2dat: fixed encoder bug (make(..., nonzero) and append later)
This commit is contained in:
gravestench 2021-03-11 22:22:41 -08:00 committed by GitHub
commit 54745a215b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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())