when looping through a DFA in a functor, make sure we return the absolute index to the calling function and not a modified version of the absolute index which has already been clipped
This commit is contained in:
@@ -147,7 +147,7 @@ struct
|
||||
if idx = String.size str then
|
||||
case tl of
|
||||
str :: tl => foldNext (0, absIdx, str, tl, currentState, counter)
|
||||
| [] => Int.max (absIdx - 2, 0)
|
||||
| [] => absIdx
|
||||
else
|
||||
let
|
||||
val chr = String.sub (str, idx)
|
||||
|
||||
Reference in New Issue
Block a user