fix off-by-one bug

This commit is contained in:
Axel Kohlmeyer
2021-07-16 22:44:04 -04:00
parent 5912d0a1c2
commit d462bb3131

View File

@ -254,7 +254,7 @@ void FixExternal::set_vector_length(int n)
void FixExternal::set_vector(int index, double value)
{
if (index >= size_vector)
if (index > size_vector)
error->all(FLERR,"Invalid set_vector index in fix external");
caller_vector[index-1] = value;
}