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 | 571718741434f712bd7c0d0594df3cbe85012f40 (patch) | |
tree | f29225f2adaaf97f9030507b31ef595023a9795b | |
parent | 5a011502e376c1626e94972164696c976ea0d567 (diff) | |
download | perl-571718741434f712bd7c0d0594df3cbe85012f40.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
-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. */ |