From d5b8b753139345ab7b8675f2753bb1285981489e Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 13 Jun 2012 14:04:02 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8269 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/variable.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/variable.cpp b/src/variable.cpp index 82b3276504..839f6dd093 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -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);