mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
use mp_obj_new_int_from_uint when returning uint32
This commit is contained in:
parent
d5942d664c
commit
5c3e0c9b6f
@ -29,7 +29,7 @@ STATIC mp_obj_t mod_TrezorCrypto_Random_uniform(mp_obj_t self, mp_obj_t n) {
|
||||
if (nn == 0) {
|
||||
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "Maximum can't be zero"));
|
||||
}
|
||||
return MP_OBJ_NEW_SMALL_INT(random_uniform(nn));
|
||||
return mp_obj_new_int_from_uint(random_uniform(nn));
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_TrezorCrypto_Random_uniform_obj, mod_TrezorCrypto_Random_uniform);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user