Fix the crash of Regexp.Replace() when pcre2 library is used.
[GB.PCRE] * BUG: Fix the crash of Regexp.Replace() when pcre2 library is used.
This commit is contained in:
parent
75ff35c40f
commit
c865a5a7e5
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ BEGIN_METHOD(RegExp_Replace, GB_STRING subject; GB_STRING pattern; GB_STRING rep
|
||||||
#endif
|
#endif
|
||||||
exec(&r, GB.StringLength(subject) - offset);
|
exec(&r, GB.StringLength(subject) - offset);
|
||||||
|
|
||||||
if (r.ovector[0] < 0)
|
if (!r.ovector || r.ovector[0] < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
_subst_regexp = &r;
|
_subst_regexp = &r;
|
||||||
|
|
Loading…
Reference in a new issue