summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-01-05 16:47:54 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-01-05 16:47:54 -0800
commit492ebabafba699f4c29cfd76c551ec1f342f08e9 (patch)
treefb48f9b7584089e130a95747aa7dddcf4af66e4c /universal.c
parent1b3a61788ecdf8350861745c654a8e81a2fea890 (diff)
downloadperl-492ebabafba699f4c29cfd76c551ec1f342f08e9.tar.gz
[perl #91850] utf8::decode: croak for ro scalars
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/universal.c b/universal.c
index 9d743abaaa..dd8ae74372 100644
--- a/universal.c
+++ b/universal.c
@@ -812,7 +812,7 @@ XS(XS_utf8_decode)
else {
SV * const sv = ST(0);
bool RETVAL;
- if (SvIsCOW(sv)) sv_force_normal(sv);
+ if (SvREADONLY(sv)) sv_force_normal(sv);
RETVAL = sv_utf8_decode(sv);
ST(0) = boolSV(RETVAL);
}