diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-08-28 13:11:44 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-08-28 13:11:44 +0000 |
commit | d3133c8951f1251e8d76e1b8b31b8ec2ee12bc89 (patch) | |
tree | a175910cd9ae8a5e9e79cf3fac43d6c96fdeb620 /perl.c | |
parent | 6459291e97011e9b9c7ca68a2645055ad8be7c1d (diff) | |
download | perl-d3133c8951f1251e8d76e1b8b31b8ec2ee12bc89.tar.gz |
Fix #30660: Repeated spaces on shebang line stops option parsing
From a patch and test sent by Renée Bäcker in
<48B271A3.80808@smart-websolutions.de>
p4raw-id: //depot/perl@34234
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -3431,8 +3431,10 @@ Internet, point your browser at http://www.perl.org/, the Perl Home Page.\n\n"); return s; case '*': case ' ': - if (s[1] == '-') /* Additional switches on #! line. */ - return s+2; + while( *s == ' ' ) + ++s; + if (s[0] == '-') /* Additional switches on #! line. */ + return s+1; break; case '-': case 0: |