pl2: lintfix

This commit is contained in:
M. Sz 2021-02-25 19:26:01 +01:00
parent d61d829b98
commit 976d78e595
2 changed files with 3 additions and 0 deletions

View File

@ -42,8 +42,10 @@ func Load(data []byte) (*PL2, error) {
return result, nil
}
// Marshal encodes PL2 back into byte slice
func (p *PL2) Marshal() []byte {
restruct.EnableExprBeta()
data, err := restruct.Pack(binary.LittleEndian, p)
if err != nil {
panic(err)

View File

@ -35,5 +35,6 @@ func TestPL2_MarshalUnmarshal(t *testing.T) {
}
if pl2.DarkendColorShift.Indices[0] != newPL2.DarkendColorShift.Indices[0] {
t.Fatal("unexpected index set")
}
}