Skip to content

fix: Double ending issue in ParallelRaceGroup#261

Open
Nv7-GitHub wants to merge 2 commits intoFTCLib:masterfrom
Nv7-GitHub:hotfix-parallelracegroup
Open

fix: Double ending issue in ParallelRaceGroup#261
Nv7-GitHub wants to merge 2 commits intoFTCLib:masterfrom
Nv7-GitHub:hotfix-parallelracegroup

Conversation

@Nv7-GitHub
Copy link
Copy Markdown

This PR fixes a bug in ParallelRaceGroup that ends one of the commands twice. The end method in SequentialCommandGroup updates its array index to -1 when called, so if the end method in SequentialCommandGroup is called twice, an array out of bounds error occurs. With the current code, if a SequentialCommandGroup finishes first in a ParallelRaceGroup, a fatal error occurs, so this PR fixes it (without any breaking changes).

@Nv7-GitHub
Copy link
Copy Markdown
Author

I also fixed the issue in SequentialCommandGroup now!

@Powercube7
Copy link
Copy Markdown
Contributor

@Nv7-GitHub This was so needed, I spotted this issue 2 seasons ago, wrote my own fix for it but forgot to actually write it for the repo in general, good thinking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants