avoid integer overflow when computing memory usage
This commit is contained in:
@ -2452,8 +2452,8 @@ double FixRigid::memory_usage()
|
||||
bytes += (double)maxvatom*6 * sizeof(double); // vatom
|
||||
if (extended) {
|
||||
bytes += (double)nmax * sizeof(int);
|
||||
if (orientflag) bytes = nmax*orientflag * sizeof(double);
|
||||
if (dorientflag) bytes = nmax*3 * sizeof(double);
|
||||
if (orientflag) bytes = (double)nmax*orientflag * sizeof(double);
|
||||
if (dorientflag) bytes = (double)nmax*3 * sizeof(double);
|
||||
}
|
||||
return bytes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user