From 64c16a7c253c999ba679120173484876d2689c10 Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Mon, 29 Sep 2025 21:21:06 +0100 Subject: [PATCH] fix bug with shadowing 'finishIdx' value, when we still wanted access to both the previous and the new 'finishIdx' --- fcore/search-list/nfa.sml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fcore/search-list/nfa.sml b/fcore/search-list/nfa.sml index bfd2ea8..4f82a12 100644 --- a/fcore/search-list/nfa.sml +++ b/fcore/search-list/nfa.sml @@ -259,20 +259,20 @@ struct , startIdx , finishIdx ) - | VALID finishIdx => + | VALID foundIdx => let - val acc = PersistentVector.append (startIdx, finishIdx, acc) + val acc = PersistentVector.append (startIdx, foundIdx, acc) in loop - ( strIdx + 1 + ( foundIdx + 1 , hd , tl , prevStrings , origNfa , origNfa , acc - , absIdx + 1 - , absIdx + 1 + , foundIdx + 1 + , foundIdx + 1 , finishIdx ) end