mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-23 00:46:33 +00:00
s integer overflow, unsafe cast
This commit is contained in:
@@ -631,9 +631,9 @@ std::vector<TickNextTickData> *ServerLevel::fetchTicksInChunk(LevelChunk *chunk,
|
||||
std::vector<TickNextTickData> *results = new std::vector<TickNextTickData>;
|
||||
|
||||
ChunkPos *pos = chunk->getPos();
|
||||
int west = pos->x << 4;
|
||||
int west = (unsigned) pos->x << 4;
|
||||
int east = west + 16;
|
||||
int north = pos->z << 4;
|
||||
int north =(unsigned) pos->z << 4;
|
||||
int south = north + 16;
|
||||
delete pos;
|
||||
|
||||
@@ -1461,4 +1461,4 @@ void ServerLevel::flagEntitiesToBeRemoved(unsigned int *flags, bool *removedFoun
|
||||
{
|
||||
chunkMap->flagEntitiesToBeRemoved(flags, removedFound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user