Skip to content

Commit

Permalink
Merge pull request #3728 from masatake/main--optimize-substitute-in-l…
Browse files Browse the repository at this point in the history
…regex

lregex: optimize substitute()
  • Loading branch information
masatake committed May 22, 2023
2 parents 8d5a92d + a04ac8f commit bf1ba55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/lregex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@ static vString* substitute (
if (0 < dig && dig < nmatch && pmatch [dig].rm_so != -1)
{
const int diglen = pmatch [dig].rm_eo - pmatch [dig].rm_so;
vStringNCatS (result, in + pmatch [dig].rm_so, diglen);
vStringNCatSUnsafe (result, in + pmatch [dig].rm_so, diglen);
}
}
else if (*p != '\n' && *p != '\r')
Expand Down

0 comments on commit bf1ba55

Please sign in to comment.