Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

正規表現キーワードの一致判定が0文字マッチをマッチとみなさないように変更する #1030

Merged
3 changes: 2 additions & 1 deletion sakura_core/CRegexKeyword.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ BOOL CRegexKeyword::RegexIsKeyword(
int matched = ExistBMatchEx()
? BMatchEx(NULL, begp, startp, endp, &pBregexp, m_szMsg)
: BMatch(NULL, startp, endp, &pBregexp, m_szMsg);
if( 0 < matched )
if( 0 < matched
&& pBregexp->endp[0] - pBregexp->startp[0] > 0 )
beru marked this conversation as resolved.
Show resolved Hide resolved
{
info.nOffset = pBregexp->startp[0] - begp;
info.nLength = pBregexp->endp[0] - pBregexp->startp[0];
Expand Down