Skip to content

Commit

Permalink
Fix prepull warnings attribution bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyt857 committed Oct 8, 2023
1 parent fec4d75 commit 200b8c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sim/core/apl.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ func (unit *Unit) newAPLRotation(config *proto.APLRotation) *APLRotation {
}

// Parse prepull actions
for prepullIdx, prepullItem := range config.PrepullActions {
for i, prepullItem := range config.PrepullActions {
prepullIdx := i // Save to local variable for correct lambda capture behavior
rotation.doAndRecordWarnings(&rotation.prepullWarnings[prepullIdx], true, func() {
if !prepullItem.Hide {
doAtVal := rotation.newAPLValue(prepullItem.DoAtValue)
Expand Down

0 comments on commit 200b8c7

Please sign in to comment.