From 94b200d4710f6ffb5e3bb7aa622fa82be39be177 Mon Sep 17 00:00:00 2001 From: Jonathan Blake Date: Mon, 13 Apr 2015 17:41:55 +0000 Subject: [PATCH] fixing condition in gblint.pl that leads to undefined section; adding sections found in Freeway Warrior series git-svn-id: https://projectaon.org/data/trunk@2442 f6f3e2d7-ff33-0410-aaf5-b4bee2cdac11 --- common/scripts/gblint.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/scripts/gblint.pl b/common/scripts/gblint.pl index c824503..0caf1b4 100755 --- a/common/scripts/gblint.pl +++ b/common/scripts/gblint.pl @@ -70,6 +70,13 @@ my %sectionDocLookup = ( 'howcarry' => 'equipmnt', 'howmuch' => 'equipmnt', 'howuse' => 'equipmnt', + 'backpack' => 'equipmnt', + 'ammpouch' => 'equipmnt', + 'medikit' => 'equipmnt', + 'canteen' => 'equipmnt', + 'weapons' => 'weapons', + 'close' => 'weapons', + 'missile' => 'weapons', 'cmbtrulz' => 'cmbtrulz', 'evasion' => 'cmbtrulz', 'lorecrcl' => 'lorecrcl', @@ -170,7 +177,7 @@ while( $#ARGV > -1 && $ARGV[ 0 ] =~ /^-/ ) { } my $lineNumber = 1; -my $currentSection = "_unknown"; +my $currentSection = ''; while( my $line = <> ) { my @section = ( $line =~ /]+id="([^"]*)"/g ); @@ -182,6 +189,7 @@ while( my $line = <> ) { else { $currentSection = $sectionDocLookup{$section[ 0 ]}; } + $currentSection = '_unknown' unless defined $currentSection; } if( $skipLines >= $lineNumber ) { -- 2.34.1