mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02: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:
@@ -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
|
||||
|
Reference in New Issue
Block a user