From: Nicholas Clark Date: Sun, 7 Mar 2004 23:31:49 +0000 (+0000) Subject: Fix Dave's original shared hash key corruption bug X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4c94c214622791382d764e5aa3e12c672818b5fb;p=p5sagit%2Fp5-mst-13.2.git Fix Dave's original shared hash key corruption bug p4raw-id: //depot/perl@22465 --- diff --git a/sv.c b/sv.c index e49ac5e..ad9c33a 100644 --- a/sv.c +++ b/sv.c @@ -3570,6 +3570,12 @@ void Perl_sv_utf8_encode(pTHX_ register SV *sv) { (void) sv_utf8_upgrade(sv); + if (SvIsCOW(sv)) { + sv_force_normal_flags(sv, 0); + } + if (SvREADONLY(sv)) { + Perl_croak(aTHX_ PL_no_modify); + } SvUTF8_off(sv); }