summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-01-31 22:59:27 +0000
committerNicholas Clark <nick@ccl4.org>2006-01-31 22:59:27 +0000
commitb3d904f31378536c078f52a858f0bfe70f0bade7 (patch)
tree8316fe66b00b384ad29c6face883f812414982f2 /perl.c
parentfc2007d4a9b17b1ac334e18213f5b0840803b58d (diff)
downloadperl-b3d904f31378536c078f52a858f0bfe70f0bade7.tar.gz
Make Perl_gv_fetchpvn_flags actually heed the passed in length.
This means that \0 bytes in symbolic references now work. p4raw-id: //depot/perl@27028
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl.c b/perl.c
index e9f7795892..d145acbffe 100644
--- a/perl.c
+++ b/perl.c
@@ -4539,9 +4539,9 @@ Perl_init_argv_symbols(pTHX_ register int argc, register char **argv)
break;
}
if ((s = strchr(argv[0], '='))) {
- *s = '\0';
- sv_setpv(GvSV(gv_fetchpv(argv[0] + 1, TRUE, SVt_PV)), s + 1);
- *s = '=';
+ const char *const start_name = argv[0] + 1;
+ sv_setpv(GvSV(gv_fetchpvn_flags(start_name, s - start_name,
+ TRUE, SVt_PV)), s + 1);
}
else
sv_setiv(GvSV(gv_fetchpv(argv[0]+1,TRUE, SVt_PV)),1);