Skip to content

Commit

Permalink
Fix fencepost error: since we check foo[$lines - 1] make the test
Browse files Browse the repository at this point in the history
 $lines > 0.
  • Loading branch information
fenner committed Feb 3, 2005
1 parent 1fdfb75 commit bf35bb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions abnf.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Sooooo many things to want to fix up.
# Bill Fenner <[email protected]> 23 June 2004
#
# $Fenner: abnf-parser/abnf.cgi,v 1.3 2004/09/16 18:34:15 fenner Exp $
# $Fenner: abnf-parser/abnf.cgi,v 1.4 2004/09/17 03:48:12 fenner Exp $
#
use CGI qw/:standard/;

Expand Down Expand Up @@ -42,7 +42,7 @@ if (param("abnf")) {
if ($col == 0) {
$line--;
}
while ($line > 0 && $lines[$line - 1] =~ /^(\s|$)/) {
while ($line > 1 && $lines[$line - 1] =~ /^(\s|$)/) {
$line--;
}
while ($line <= $lastline) {
Expand Down

0 comments on commit bf35bb2

Please sign in to comment.