mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-06-15 20:15:24 +00:00
pl2: lintfix
This commit is contained in:
parent
d61d829b98
commit
976d78e595
|
@ -42,8 +42,10 @@ func Load(data []byte) (*PL2, error) {
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Marshal encodes PL2 back into byte slice
|
||||||
func (p *PL2) Marshal() []byte {
|
func (p *PL2) Marshal() []byte {
|
||||||
restruct.EnableExprBeta()
|
restruct.EnableExprBeta()
|
||||||
|
|
||||||
data, err := restruct.Pack(binary.LittleEndian, p)
|
data, err := restruct.Pack(binary.LittleEndian, p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
|
@ -35,5 +35,6 @@ func TestPL2_MarshalUnmarshal(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if pl2.DarkendColorShift.Indices[0] != newPL2.DarkendColorShift.Indices[0] {
|
if pl2.DarkendColorShift.Indices[0] != newPL2.DarkendColorShift.Indices[0] {
|
||||||
|
t.Fatal("unexpected index set")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user