USER-DPD: correct off-by-one errors in PairTableRX::coeff()

This commit is contained in:
Tim Mattox
2017-02-28 14:25:03 -05:00
parent 49e83b4348
commit 7a593c2fc8

View File

@ -351,7 +351,7 @@ void PairTableRX::coeff(int narg, char **arg)
nspecies = atom->nspecies_dpd;
if(nspecies==0) error->all(FLERR,"There are no rx species specified.");
int n;
n = strlen(arg[3]) + 1;
n = strlen(arg[4]) + 1;
site1 = new char[n];
strcpy(site1,arg[4]);
@ -362,7 +362,7 @@ void PairTableRX::coeff(int narg, char **arg)
if (ispecies == nspecies && strcmp(site1,"1fluid") != 0)
error->all(FLERR,"Site1 name not recognized in pair coefficients");
n = strlen(arg[4]) + 1;
n = strlen(arg[5]) + 1;
site2 = new char[n];
strcpy(site2,arg[5]);