From 3f0360b9bee1535a0bd11a858b51e5dcad70ca49 Mon Sep 17 00:00:00 2001 From: Rockingcool Date: Thu, 9 Jan 2025 10:39:04 -0600 Subject: [PATCH] Fixed bug where I used the 'lookaroundNumCaptureGroups' member of the wrong State struct --- nfa.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nfa.go b/nfa.go index 31cdcfc..8b98ee7 100644 --- a/nfa.go +++ b/nfa.go @@ -136,7 +136,7 @@ func (s State) checkAssertion(str []rune, idx int) bool { strToMatch = string(runesToMatch) } - matchIndices := findAllMatches(Reg{startState, startState.lookaroundNumCaptureGroups}, strToMatch) + matchIndices := findAllMatches(Reg{startState, s.lookaroundNumCaptureGroups}, strToMatch) numMatchesFound := 0 for _, matchIdx := range matchIndices {