1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-21 15:48:08 +00:00

Merge pull request #3736 from flaggx1/fix_get_random_num

Fix get_random_num function to be inclusive of max parameter
This commit is contained in:
Jens Steube 2023-05-28 20:07:22 +02:00 committed by GitHub
commit ba4ce96bbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -622,11 +622,11 @@ u32 get_random_num (const u32 min, const u32 max)
#if defined (_WIN)
return (((u32) rand () % (max - min)) + min);
return (((u32) rand () % (max - min + 1)) + min);
#else
return (((u32) random () % (max - min)) + min);
return (((u32) random () % (max - min + 1)) + min);
#endif
}