mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 00:28:23 +01:00
Merge commit '6e92ecf9efab80668453622bc42226616043320e'
This commit is contained in:
commit
c1c6ca18a8
@ -1108,15 +1108,14 @@ init_mix(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const int max_int = (int) (std::numeric_limits<int>::max)();
|
if (2.25 * maxmix + 1.0 > (double)INT_MAX)
|
||||||
if ((int)round(2.25 * maxmix) > max_int)
|
|
||||||
{
|
{
|
||||||
char token[MAX_LENGTH];
|
char token[MAX_LENGTH];
|
||||||
sprintf(token, "Calculated number of mixes %g, is beyond program limit,\nERROR: please decrease time_step.", 2.25 * maxmix);
|
sprintf(token, "Calculated number of mixes %g, is beyond program limit,\nERROR: please decrease time_step.", 2.25 * maxmix);
|
||||||
error_msg(token, STOP);
|
error_msg(token, STOP);
|
||||||
}
|
}
|
||||||
if (bcon_first == 1 || bcon_last == 1)
|
if (bcon_first == 1 || bcon_last == 1)
|
||||||
l_nmix = 1 + (long int) floorl(2.25 * maxmix);
|
l_nmix = 1 + (int) floor(2.25 * maxmix);
|
||||||
else
|
else
|
||||||
l_nmix = 1 + (int) floor(1.5 * maxmix);
|
l_nmix = 1 + (int) floor(1.5 * maxmix);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user