protect against cases where @ARGV == 0, which can happen very seldom...

This commit is contained in:
espie 2005-10-10 19:43:33 +00:00
parent 8089498934
commit c4ced942c9

View File

@ -1,5 +1,5 @@
#! /usr/bin/perl
# $OpenBSD: resolve-lib,v 1.7 2005/10/10 19:04:06 espie Exp $
# $OpenBSD: resolve-lib,v 1.8 2005/10/10 19:43:33 espie Exp $
#
# Copyright (c) 2001, 2005 Marc Espie <espie@openbsd.org>
#
@ -175,7 +175,7 @@ sub solve_spec
my $noshared;
# Grab arguments
if ($ARGV[0] eq '-noshared') {
if (@ARGV > 0 && $ARGV[0] eq '-noshared') {
$noshared = 1;
shift;
}