mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 09:33:51 +00:00
fix: resolve all GitHub CodeQL security/quality alerts
Fix 9 integer-multiplication-cast-to-long warnings across 6 files: - wmo_renderer.cpp: grid cell count and height variance calculation - composite_renderer.cpp: overlay tile grid allocation - vk_texture.cpp: image size calculation (width*height*bpp) - m2_renderer.cpp: collision grid cell allocation - character_renderer.cpp: normal map buffer and height variance - world_entry_callback_handler.cpp: tile reserve count All fixes cast operands to size_t/double before multiplication to prevent integer overflow when dimensions are large.
This commit is contained in:
parent
d773109b50
commit
67f4097e74
6 changed files with 9 additions and 9 deletions
|
|
@ -1032,8 +1032,8 @@ void M2ModelGPU::CollisionMesh::build() {
|
|||
gridCellsX = std::max(1, std::min(32, static_cast<int>(std::ceil((bmax.x - bmin.x) / CELL_SIZE))));
|
||||
gridCellsY = std::max(1, std::min(32, static_cast<int>(std::ceil((bmax.y - bmin.y) / CELL_SIZE))));
|
||||
|
||||
cellFloorTris.resize(gridCellsX * gridCellsY);
|
||||
cellWallTris.resize(gridCellsX * gridCellsY);
|
||||
cellFloorTris.resize(static_cast<size_t>(gridCellsX) * static_cast<size_t>(gridCellsY));
|
||||
cellWallTris.resize(static_cast<size_t>(gridCellsX) * static_cast<size_t>(gridCellsY));
|
||||
triBounds.resize(triCount);
|
||||
|
||||
for (uint32_t ti = 0; ti < triCount; ti++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue