From 32c1dcf44f8c017f0de95c71882742eca8efde1b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 17 Jun 2020 01:25:06 -0400 Subject: [PATCH] improve match for "id" first checks --- src/atom_vec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index 03b70fc54c..fbf6cfd043 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -2373,9 +2373,9 @@ void AtomVec::setup_fields() { int n,cols; - if (strstr(fields_data_atom,"id ") != fields_data_atom) + if (!utils::strmatch(fields_data_atom,"^id ")) error->all(FLERR,"Atom style fields_data_atom must have id as first field"); - if (strstr(fields_data_vel,"id v") != fields_data_vel) + if (!utils::strmatch(fields_data_vel,"^id v")) error->all(FLERR,"Atom style fields_data_vel must have " "'id v' as first fields");