From 71149768c6cbbcb8f6bb48bca24db61de45ef8d0 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Thu, 7 May 2020 10:42:40 -0600 Subject: [PATCH] fix atom_vec_hybrid bug --- src/atom_vec_hybrid.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index 7f47f64d91..51f484711c 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -214,7 +214,7 @@ void AtomVecHybrid::process_args(int narg, char **arg) for (int idup = 0; idup < ndupfield; idup++) { char *dup = (char *) dupfield[idup]; ptr = strstr(concat_grow,dup); - if (strstr(ptr+1,dup)) { + if (ptr && strstr(ptr+1,dup)) { char str[128]; sprintf(str,"Peratom %s is in multiple sub-styles - " "must be used consistently",dup); @@ -565,7 +565,7 @@ void AtomVecHybrid::build_styles() #undef ATOM_CLASS allstyles = new char*[nallstyles]; - + int n; nallstyles = 0; #define ATOM_CLASS