mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
ParticleSpawner: Fix crash caused by empty texture
no_texture.png is now used as a fallback (if available), like already seen with registered items with empty 'inventory_image'.
This commit is contained in:
parent
c9230c5c09
commit
d60f909566
2 changed files with 14 additions and 3 deletions
|
@ -83,6 +83,9 @@ u32 PcgRandom::range(u32 bound)
|
|||
if (bound == 0)
|
||||
return next();
|
||||
|
||||
if (bound == 1)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
This is an optimization of the expression:
|
||||
0x100000000ull % bound
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue