fix defect 2823133 noderange expansion incorrect, for example node19+2
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3828 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
1b1e6121fc
commit
6bcd2f46c9
@ -144,10 +144,10 @@ sub expandatom {
|
||||
|
||||
if ($atom =~ m/\+/) { # process the + operator
|
||||
$atom =~ m/^(.*)([0-9]+)([^0-9\+]*)\+([0-9]+)/;
|
||||
my $pref=$1;
|
||||
my $startnum=$2;
|
||||
my ($front, $increment) = split(/\+/, $atom, 2);
|
||||
my ($pref, $startnum, $dom) = $front =~ /^(.*?)(\d+)(\..+)?$/;
|
||||
my $suf=$3;
|
||||
my $end=$4+$startnum;
|
||||
my $end=$startnum+$increment;
|
||||
my $endnum = sprintf("%d",$end);
|
||||
if (length ($startnum) > length ($endnum)) {
|
||||
$endnum = sprintf("%0".length($startnum)."d",$end);
|
||||
|
Loading…
Reference in New Issue
Block a user