This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
off-by-one in os2.c (from Ilya Zakharevich)
authorGurusamy Sarathy <gsar@cpan.org>
Sat, 11 Mar 2000 17:01:47 +0000 (17:01 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Sat, 11 Mar 2000 17:01:47 +0000 (17:01 +0000)
p4raw-id: //depot/perl@5654

os2/os2.c

index 8a17ae7..97e8899 100644 (file)
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -777,7 +777,7 @@ U32 addflag;
                                                   long enough. */
                            a--;
                        }
-                       while (nargs-- >= 0)
+                       while (--nargs >= 0)
                            PL_Argv[nargs] = argsp[nargs];
                        /* Enable pathless exec if #! (as pdksh). */
                        pass = (buf[0] == '#' ? 2 : 3);