diff options
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3178,6 +3178,8 @@ PP(pp_substr) repl = SvPV_const(repl_sv_copy, repl_len); repl_is_utf8 = DO_UTF8(repl_sv_copy) && SvCUR(sv); } + if (!SvOK(sv)) + sv_setpvs(sv, ""); sv_insert(sv, pos, rem, repl, repl_len); if (repl_is_utf8) SvUTF8_on(sv); |