diff options
Diffstat (limited to 'Modules/rotormodule.c')
-rw-r--r-- | Modules/rotormodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/rotormodule.c b/Modules/rotormodule.c index 6960acf..70ba032 100644 --- a/Modules/rotormodule.c +++ b/Modules/rotormodule.c @@ -330,8 +330,8 @@ RTR_init(Rotorobj *r) RTR_e_rotors(r); RTR_d_rotors(r); for (i = 0; i < r->rotors; i++) { - r->positions[i] = (unsigned char) r_rand(r,r->size); - r->advances[i] = (1+(2*(r_rand(r,r->size/2)))); + r->positions[i] = (unsigned char) r_rand(r, (short)r->size); + r->advances[i] = (1+(2*(r_rand(r, (short)(r->size/2))))); RTR_permute_rotor(r, &(r->e_rotor[(i*r->size)]), &(r->d_rotor[(i*r->size)])); |