From: Rafael Garcia-Suarez Date: Fri, 19 Feb 2010 09:53:24 +0000 (+0100) Subject: Avoid returning an undefined SV* X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f5a573297aad004c6761b844d65a3e6d8402cd50;p=p5sagit%2Fp5-mst-13.2.git Avoid returning an undefined SV* --- diff --git a/toke.c b/toke.c index 997b46a..27cf53e 100644 --- a/toke.c +++ b/toke.c @@ -11505,7 +11505,8 @@ S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen, } /* charnames doesn't work well if there have been errors found */ - if (PL_error_count > 0 && strEQ(key,"charnames")) return res; + if (PL_error_count > 0 && strEQ(key,"charnames")) + return &PL_sv_undef; cvp = hv_fetch(table, key, keylen, FALSE); if (!cvp || !SvOK(*cvp)) {