cplusplus-_Implementation_Of_Introduction_to_Algorithms icon indicating copy to clipboard operation
cplusplus-_Implementation_Of_Introduction_to_Algorithms copied to clipboard

判断字符串有效后缀,增加判断避免访问越界

Open KirReina opened this issue 11 months ago • 1 comments

有限自动机字符串匹配算法中判断字符串后缀,若输入的子串长度大于字符串长度,迭代器从后向前访问发生越界。

KirReina avatar Mar 14 '24 14:03 KirReina

编译的debug版本在 TEST(MatchTest,test_is_end_with) 用例中,a = 2,k = 2,q = 0 时, Assertion failed: cannot seek vector iterator before begin

KirReina avatar Mar 14 '24 15:03 KirReina