Skip to content

Commit

Permalink
Fix buffer overflow in lightmap computation
Browse files Browse the repository at this point in the history
  • Loading branch information
nerudaj committed Dec 15, 2023
1 parent eae3d96 commit 71ad504
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib-game/src/builder/LightmapBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ void LightmapBuilder::processLightPointQueue(
auto front = queue.front();
queue.pop();

if (front.y > bottom.getDataSize().y
|| front.x > bottom.getDataSize().x)
if (front.y >= bottom.getDataSize().y
|| front.x >= bottom.getDataSize().x)
continue;

const auto index = front.y * bottom.getDataSize().x + front.x;
Expand Down

0 comments on commit 71ad504

Please sign in to comment.