From eb06c494d3d2e3f3b0b450c5e4958ff249d7103b Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 21 Mar 2007 14:32:25 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@416 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/group.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/group.cpp b/src/group.cpp index 2f1059351b..2c482d31b7 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -151,9 +151,10 @@ void Group::assign(int narg, char **arg) // style = logical condition - } else if (strcmp(arg[2],"<") == 0 || strcmp(arg[2],">") == 0 || - strcmp(arg[2],"<=") == 0 || strcmp(arg[2],">=") == 0 || - strcmp(arg[2],"<>") == 0) { + } else if (narg >= 3 && + (strcmp(arg[2],"<") == 0 || strcmp(arg[2],">") == 0 || + strcmp(arg[2],"<=") == 0 || strcmp(arg[2],">=") == 0 || + strcmp(arg[2],"<>") == 0)) { if (narg < 4 || narg > 5) error->all("Illegal group command"); int category,condition,bound1,bound2;