determine argument offset value to be used with error pointers

This commit is contained in:
Axel Kohlmeyer
2025-06-30 22:14:24 -04:00
parent 3cf9b018a7
commit a2054657c7
2 changed files with 5 additions and 1 deletions

View File

@ -60,7 +60,7 @@ Set::Set(class LAMMPS *lmp) :
Command(lmp), id(nullptr), region(nullptr), actions(nullptr), invoke_choice(nullptr),
vec1(nullptr), vec2(nullptr), vec3(nullptr), vec4(nullptr), select(nullptr)
{
maxselect = maxvariable = 0;
argoff = maxselect = maxvariable = 0;
}
/* ---------------------------------------------------------------------- */
@ -135,6 +135,9 @@ void Set::process_args(int caller_flag, int narg, char **arg)
{
caller = caller_flag;
// determine offset for error pointer in process_XXX(). will be different for set and fix set.
while (input && input->arg[argoff] && (strcmp(input->arg[argoff], arg[0]) != 0)) argoff++;
// style and ID info
id = utils::strdup(arg[1]);

View File

@ -43,6 +43,7 @@ class Set : public Command {
// params for atom selection
int style;
int argoff;
char *id;
int nlo, nhi;
bigint nlobig, nhibig;