From ceb871e3fafb8bc174e4dd355f64ec50a67c9c95 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 14 Oct 2021 10:15:08 -0400 Subject: [PATCH] Process calcrom options first --- .github/calcrom/calcrom.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/calcrom/calcrom.pl b/.github/calcrom/calcrom.pl index 2aaf25c436..c351c76122 100755 --- a/.github/calcrom/calcrom.pl +++ b/.github/calcrom/calcrom.pl @@ -5,14 +5,14 @@ use Getopt::Long; my $usage = "Usage: calcrom.pl file.map [--data]\n"; -(@ARGV >= 1) +my $showData; +GetOptions("data" => \$showData) or die $usage; + +(@ARGV == 1) or die $usage; open(my $file, $ARGV[0]) or die "ERROR: could not open file '$ARGV[0]'.\n"; -my $showData; -GetOptions("data" => \$showData) or die $usage; - my $src = 0; my $asm = 0; my $srcdata = 0;