s integer overflow, unsafe cast

This commit is contained in:
Nikita Edel committed 2026-03-11 16:10:48 +01:00
1 parent a24f9f5a5e
commit ed13020cf3
7 files changed
+28 -23

No files matched your search

+3 -3
View File
@@ -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);
}
}
}