s integer overflow, unsafe cast

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

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);
}
}
}