Skip to content

Commit 0597164

Browse files
committed
Fix invalid indexing
`curIdx` is an index of `astChildren`, not `children`.
1 parent f436cca commit 0597164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/_StringProcessing/Regex/ASTConversion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ extension AST.Node {
102102
curIdx = nextIdx
103103
} else {
104104
children.append(astChildren[curIdx].dslTreeNode)
105-
children.formIndex(after: &curIdx)
105+
astChildren.formIndex(after: &curIdx)
106106
}
107107
}
108108
return .concatenation(children)

0 commit comments

Comments
 (0)