fix off-by-one error

This commit is contained in:
Axel Kohlmeyer 2019-05-31 14:38:12 -04:00
parent 5f657b9184
commit 68d69955d0
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 1 additions and 1 deletions

View File

@ -384,7 +384,7 @@ void Variable::set(int narg, char **arg)
num[nvar] = 3;
which[nvar] = 0;
pad[nvar] = 0;
if (!utils::strmatch(arg[2],"%[0-9 ]*\\.[0-9]+[efgEFG]"))
if (!utils::strmatch(arg[3],"%[0-9 ]*\\.[0-9]+[efgEFG]"))
error->all(FLERR,"Incorrect conversion in format string");
data[nvar] = new char*[num[nvar]];
copy(2,&arg[2],data[nvar]);