Skip to content

Commit

Permalink
Fix first parallel commands in group not being added
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX committed Feb 17, 2018
1 parent 7ab9c87 commit f24dbd9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/kotlin/org/sertain/command/Command.kt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ public class CommandGroup : CommandBridgeMirror() {
if (entry.sequential && entries.getOrNull(prevIndex)?.parallel == true) {
// Walk back up the stack to find all linear parallel commands
for ((trace, prev) in entries.slice(0..prevIndex).reversed().withIndex()) {
if (prev.parallel) continue // Wait until we reach the first sequential entry
// Wait until we reach the first sequential entry
if (prev.parallel && trace != prevIndex) continue

val start = prevIndex - trace
val parallels = entries.slice(start..prevIndex)
Expand Down

0 comments on commit f24dbd9

Please sign in to comment.