Skip to content

Commit

Permalink
Encode::CN::HZ: Do not try to modify readonly scalar $1
Browse files Browse the repository at this point in the history
  • Loading branch information
pali committed Oct 26, 2016
1 parent 9f30426 commit 0da896b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Encode/CN/HZ.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ sub decode ($$;$) {
else { # GB mode; the byte ranges are as in RFC 1843.
no warnings 'uninitialized';
if ( $str =~ s/^((?:[\x21-\x77][\x21-\x7E])+)// ) {
$ret .= $GB->decode( $1, $chk );
my $prefix = $1;
$ret .= $GB->decode( $prefix, $chk );
}
elsif ( $str =~ s/^\x7E\x7D// ) { # '~}'
$in_ascii = 1;
Expand Down

0 comments on commit 0da896b

Please sign in to comment.