forked from premiere/premiere-libtorrent
fix ambiguous call to abs() in tommath (#1228)
fix ambiguous call to abs() in tommath
This commit is contained in:
parent
037f349cee
commit
7009001f73
|
@ -6708,7 +6708,7 @@ mp_rand (mp_int * a, int digits)
|
|||
|
||||
/* first place a random non-zero digit */
|
||||
do {
|
||||
d = ((mp_digit) abs (MP_GEN_RANDOM())) & MP_MASK;
|
||||
d = ((mp_digit) abs (int(MP_GEN_RANDOM()))) & MP_MASK;
|
||||
} while (d == 0);
|
||||
|
||||
if ((res = mp_add_d (a, d, a)) != MP_OKAY) {
|
||||
|
@ -6720,7 +6720,7 @@ mp_rand (mp_int * a, int digits)
|
|||
return res;
|
||||
}
|
||||
|
||||
if ((res = mp_add_d (a, ((mp_digit) abs (MP_GEN_RANDOM())), a)) != MP_OKAY) {
|
||||
if ((res = mp_add_d (a, ((mp_digit) abs (int(MP_GEN_RANDOM()))), a)) != MP_OKAY) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue