1
0
Fork 0
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:
SmallJoker 2025-07-22 16:39:51 +02:00 committed by GitHub
parent c9230c5c09
commit d60f909566
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 3 deletions

View file

@ -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