Skip to content

Commit

Permalink
fix bug with P2's per-column judgment tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
quietly-turning committed Sep 22, 2016
1 parent 8a77487 commit f6e818a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- in both Casual, Competitive, and ECFA modes. If we're in one
-- of those modes, bail now.
if SL.Global.GameMode ~= "StomperZ" then
return false
return Def.Actor{}
end

local player = ...
Expand Down

1 comment on commit f6e818a

@kyzentun
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related stepmania commit: stepmania/stepmania@e056908

The "false" entry in the child table caused iLen to be shorter than the actual length of the table. iLen is used to detect whether an integer indexed table has already been added.

In your case, there are 6 entries in the table, {P1_SubmissiveScoring, P1_PerColumnJudgment, false, P2_SubmissiveScoring, P2_PerColumnJudgment, false}
NodeNamesToAdd.size comes out to 4, and the names are 1, 2, 4, 5. 5 is greater than 4, so the code thought it was an entry past the end of the array, an entry that had not already been added.

So P2_PerColumnJudgment got duplicated.

Please sign in to comment.