You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this can be fixed with ensuring the length, I'm not entirely sure the logic of the strings.Index is correct, or how the matches slice is created is correct.
Hi Isaac, thanks for the bug report. I have to remind myself what the reference implementation was, and recheck the logic issue you raised here. It's likely that you are correct here, but let me find the time to take a plunge at the code and return back to this.
There is a panic when comparing the window runes with the matches slice if the strings.Index call returns an index greater than the number of matches.
I was able to reproduce this when comparing the two following strings:
While this can be fixed with ensuring the length, I'm not entirely sure the logic of the
strings.Index
is correct, or how the matches slice is created is correct.Should the index really ever be returning a value that's greater than the number of matches?
The text was updated successfully, but these errors were encountered: