mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-02 22:57:04 -05:00
d2ds1: fixed bug, when cullNilLayers worked incorrect
This commit is contained in:
parent
49e8e42596
commit
ce7586fa54
@ -81,9 +81,9 @@ func (l *ds1Layers) cullNilLayers(t LayerGroupType) {
|
||||
// exit culling procedure when no nil layers are found in entire group.
|
||||
culling:
|
||||
for {
|
||||
for idx := len(*group) - 1; idx > 0; idx-- {
|
||||
for idx := len(*group) - 1; idx >= 0; idx-- {
|
||||
if (*group)[idx] == nil {
|
||||
*group = (*group)[:idx]
|
||||
*group = append((*group)[:idx], (*group)[idx+1:]...)
|
||||
continue culling
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user