Skip to content

Commit 8b7b047

Browse files
Maullerxezon
authored andcommitted
[ZH] Fix partly uninitialized cellBounds variable in AIPathfind::classifyFence() (#632)
1 parent 092a2d2 commit 8b7b047

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -4031,6 +4031,8 @@ void Pathfinder::classifyFence( Object *obj, Bool insert )
40314031
IRegion2D cellBounds;
40324032
cellBounds.lo.x = REAL_TO_INT_FLOOR((pos->x + 0.5f)/PATHFIND_CELL_SIZE_F);
40334033
cellBounds.lo.y = REAL_TO_INT_FLOOR((pos->y + 0.5f)/PATHFIND_CELL_SIZE_F);
4034+
cellBounds.hi.x = REAL_TO_INT_CEIL((pos->x + 0.5f)/PATHFIND_CELL_SIZE_F);
4035+
cellBounds.hi.y = REAL_TO_INT_CEIL((pos->y + 0.5f)/PATHFIND_CELL_SIZE_F);
40344036
Bool didAnything = false;
40354037

40364038
for (Int iy = 0; iy < numStepsY; ++iy, tl_x += ydx, tl_y += ydy)

0 commit comments

Comments
 (0)