fix atom_vec_hybrid bug

This commit is contained in:
Steve Plimpton
2020-05-07 10:42:40 -06:00
parent 8ed5829d32
commit 71149768c6

View File

@ -214,7 +214,7 @@ void AtomVecHybrid::process_args(int narg, char **arg)
for (int idup = 0; idup < ndupfield; idup++) { for (int idup = 0; idup < ndupfield; idup++) {
char *dup = (char *) dupfield[idup]; char *dup = (char *) dupfield[idup];
ptr = strstr(concat_grow,dup); ptr = strstr(concat_grow,dup);
if (strstr(ptr+1,dup)) { if (ptr && strstr(ptr+1,dup)) {
char str[128]; char str[128];
sprintf(str,"Peratom %s is in multiple sub-styles - " sprintf(str,"Peratom %s is in multiple sub-styles - "
"must be used consistently",dup); "must be used consistently",dup);
@ -565,7 +565,7 @@ void AtomVecHybrid::build_styles()
#undef ATOM_CLASS #undef ATOM_CLASS
allstyles = new char*[nallstyles]; allstyles = new char*[nallstyles];
int n; int n;
nallstyles = 0; nallstyles = 0;
#define ATOM_CLASS #define ATOM_CLASS