From cd3413cbbd08762c41f584d23806a18fb5f1160d Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 17 Feb 2014 16:04:06 -0700 Subject: [PATCH] regexec.c: Add some checks These aren't currently needed, but a future commit will change so things need to be more general --- regexec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/regexec.c b/regexec.c index 28b0bb9..c93171d 100644 --- a/regexec.c +++ b/regexec.c @@ -7563,7 +7563,8 @@ S_core_regclass_swash(pTHX_ const regexp *prog, const regnode* node, bool doinit if (ary[1] && SvROK(ary[1])) { sw = ary[1]; } - else if (si && doinit) { + else if (doinit && ((si && si != &PL_sv_undef) + || (invlist && invlist != &PL_sv_undef))) { sw = _core_swash_init("utf8", /* the utf8 package */ "", /* nameless */ -- 2.7.4