summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/universal.c b/universal.c
index 145d860bc6..d012c0f01d 100644
--- a/universal.c
+++ b/universal.c
@@ -695,6 +695,7 @@ XS(XS_utf8_decode)
croak_xs_usage(cv, "sv");
else {
SV * const sv = ST(0);
+ if (SvIsCOW(sv)) sv_force_normal(sv);
const bool RETVAL = sv_utf8_decode(sv);
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));