mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-24 00:46:28 +00:00
s integer overflow, unsafe cast
This commit is contained in:
@@ -432,7 +432,8 @@ void HellRandomLevelSource::postProcess(ChunkSource *parent, int xt, int zt)
|
||||
pprandom->setSeed(level->getSeed());
|
||||
__int64 xScale = pprandom->nextLong() / 2 * 2 + 1;
|
||||
__int64 zScale = pprandom->nextLong() / 2 * 2 + 1;
|
||||
pprandom->setSeed(((xt * xScale) + (zt * zScale)) ^ level->getSeed());
|
||||
// 4jcraft added casts to a higher int and unsigned
|
||||
pprandom->setSeed((((uint64_t)xt * (uint64_t)xScale) + ((uint64_t)zt * (uint64_t)zScale)) ^ level->getSeed());
|
||||
|
||||
netherBridgeFeature->postProcess(level, pprandom, xt, zt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user