From 687bb274182ef56234ad7e9b14c8f1656648664c Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 10 Dec 2009 20:22:40 +0000 Subject: [PATCH] -Fix problem where a '0' in a bracketed expression would break noderange expansion git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4755 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/NodeRange.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/NodeRange.pm b/perl-xCAT/xCAT/NodeRange.pm index c850637ac..29c6b2225 100644 --- a/perl-xCAT/xCAT/NodeRange.pm +++ b/perl-xCAT/xCAT/NodeRange.pm @@ -282,7 +282,9 @@ sub expandatom { #TODO: implement table selection as an atom (nodetype.os==rhels #xcat 1.2 does no better my @subelems = split(/([\,\-\:])/,$2); my $subrange=""; - while (my $subelem = shift @subelems) { + my $subelem; + while (scalar @subelems) { + my $subelem = shift @subelems; my $subop=shift @subelems; $subrange=$subrange."$1$subelem$3$subop"; }