git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8269 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2012-06-13 14:04:02 +00:00
parent e1f59347fa
commit d5b8b75313
1 changed files with 2 additions and 1 deletions

View File

@ -164,7 +164,8 @@ void Variable::set(int narg, char **arg)
} else if (narg == 4 || (narg == 5 && strcmp(arg[4],"pad") == 0)) {
nfirst = atoi(arg[2]);
nlast = atoi(arg[3]);
if (nfirst > nlast || nlast <= 0) error->all(FLERR,"Illegal variable command");
if (nfirst > nlast || nlast < 0)
error->all(FLERR,"Illegal variable command");
if (narg == 5 && strcmp(arg[4],"pad") == 0) {
char digits[12];
sprintf(digits,"%d",nlast);