mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'heydabop/bug/324-modulo-panic' into 'master'
fixes #324 - changes possible modulo range from 0-29 to 1-29 to prevent mod by 0 Closes #324 See merge request veloren/veloren!595
This commit is contained in:
commit
d719c69fca
@ -251,7 +251,7 @@ impl Item {
|
||||
1 => Self::velorite(),
|
||||
2 => Item::Tool {
|
||||
kind: *(&ALL_TOOLS).choose(&mut rand::thread_rng()).unwrap(),
|
||||
power: 8 + rand::random::<u32>() % (rand::random::<u32>() % 30),
|
||||
power: 8 + rand::random::<u32>() % (rand::random::<u32>() % 29 + 1),
|
||||
stamina: 0,
|
||||
strength: 0,
|
||||
dexterity: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user