From 3f3165af39fd85bfa80a621bc85bb6bed9262ef4 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 2 Oct 2015 19:54:31 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14086 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/force.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/force.cpp b/src/force.cpp index f56d11e0e4..aa70874adf 100644 --- a/src/force.cpp +++ b/src/force.cpp @@ -756,7 +756,7 @@ void Force::bounds(char *str, int nmax, int &nlo, int &nhi, int nmin) nhi = atoi(ptr+1); } - if (nlo < nmin || nhi > nmax) + if (nlo < nmin || nhi > nmax || nlo > nhi) error->all(FLERR,"Numeric index is out of bounds"); } @@ -790,7 +790,7 @@ void Force::boundsbig(char *str, bigint nmax, bigint &nlo, bigint &nhi, nhi = ATOBIGINT(ptr+1); } - if (nlo < nmin || nhi > nmax) + if (nlo < nmin || nhi > nmax || nlo > nhi) error->all(FLERR,"Numeric index is out of bounds"); }