summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2010-02-19 10:53:24 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2010-02-19 10:53:24 +0100
commitf5a573297aad004c6761b844d65a3e6d8402cd50 (patch)
tree15ba7a63addd695eab23396b762042f689a96b49 /toke.c
parent70a6e658a75720da8d999a28489475f2c4c51bd1 (diff)
downloadperl-f5a573297aad004c6761b844d65a3e6d8402cd50.tar.gz
Avoid returning an undefined SV*
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 997b46a3f3..27cf53e9d2 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)) {