X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/ec841a2713df373c7218f3a42db1c4cfd1a58ed7..37e77c235a1d9e646643ada8d96154d9ae4d5137:/regcomp.c diff --git a/regcomp.c b/regcomp.c index cb98e62..7500e37 100644 --- a/regcomp.c +++ b/regcomp.c @@ -5041,7 +5041,7 @@ S_compile_runtime_code(pTHX_ RExC_state_t * const pRExC_state, int n = 0; STRLEN s; char *p, *newpat; - int newlen = plen + 5; /* allow for "qr''x" extra chars */ + int newlen = plen + 6; /* allow for "qr''x\0" extra chars */ SV *sv, *qr_ref; dSP; @@ -8613,7 +8613,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) if (!SIZE_ONLY) { ret->flags = 2; /* for later propagation into (??{}) return value */ - eval->flags = (RExC_flags & RXf_PMf_COMPILETIME); + eval->flags = (U8) (RExC_flags & RXf_PMf_COMPILETIME); } REGTAIL(pRExC_state, ret, eval); /* deal with the length of this later - MJD */