diff options
author | Abhijit Menon-Sen <ams@wiw.org> | 2003-10-26 08:08:02 +0000 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2003-10-26 08:08:02 +0000 |
commit | baf98d40d2b781afd2a2c009a75ef1c9b5e0bb23 (patch) | |
tree | f29225f2adaaf97f9030507b31ef595023a9795b /mg.c | |
parent | afce8e557544caa220786ceec07d27d654f3b416 (diff) | |
download | perl-baf98d40d2b781afd2a2c009a75ef1c9b5e0bb23.tar.gz |
Fix off-by-one in $0 set magic. (From Autrijus.)
The whole PL_origalen thing in perl.c looks very hokey.
p4raw-id: //depot/perl@21538
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2403,7 +2403,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) if (len >= (STRLEN)PL_origalen) { /* Longer than original, will be truncated. */ Copy(s, PL_origargv[0], PL_origalen, char); - PL_origargv[0][PL_origalen - 1] = 0; + PL_origargv[0][PL_origalen] = 0; } else { /* Shorter than original, will be padded. */ |