must use utils::inumeric() for parsing integers
This commit is contained in:
@ -1740,9 +1740,9 @@ void Input::pair_coeff()
|
|||||||
// if arg[1] < arg[0], and neither contain a wildcard, reorder
|
// if arg[1] < arg[0], and neither contain a wildcard, reorder
|
||||||
|
|
||||||
int itype,jtype;
|
int itype,jtype;
|
||||||
if (strchr(arg[0],'*') == nullptr && strchr(arg[1],'*') == nullptr) {
|
if (utils::strmatch(arg[0],"^\\d+$") && utils::strmatch(arg[1],"^\\d+$")) {
|
||||||
itype = utils::numeric(FLERR,arg[0],false,lmp);
|
itype = utils::inumeric(FLERR,arg[0],false,lmp);
|
||||||
jtype = utils::numeric(FLERR,arg[1],false,lmp);
|
jtype = utils::inumeric(FLERR,arg[1],false,lmp);
|
||||||
if (jtype < itype) {
|
if (jtype < itype) {
|
||||||
char *str = arg[0];
|
char *str = arg[0];
|
||||||
arg[0] = arg[1];
|
arg[0] = arg[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user