mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-08 19:08:35 +00:00
Fix matching Regex against an empty string (#1253)
Removed the offset check from MatchRegex, as this is already handled by pcre_exec.
This commit is contained in:
parent
2e4fc2de54
commit
c6fc4818ae
@ -138,9 +138,6 @@ static cell_t MatchRegex(IPluginContext *pCtx, const cell_t *params)
|
||||
char *str;
|
||||
pCtx->LocalToString(params[2], &str);
|
||||
|
||||
if(offset >= strlen(str))
|
||||
return pCtx->ThrowNativeError("Invalid string index\n");
|
||||
|
||||
int e = x->Match(str, offset);
|
||||
|
||||
if (e == -1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user