Permalink
Browse files

Fix missing struct initializations

Found by Coverity scan
  • Loading branch information...
perim committed Jan 9, 2018
1 parent 0ad9860 commit 7af198ba54928aa986342107fafcde40ad363490
Showing with 5 additions and 2 deletions.
  1. +4 −1 src/astar.cpp
  2. +1 −1 src/basedef.h
View
@@ -148,7 +148,10 @@ struct PathNonblockingArea
return x >= x1 && x < x2 && y >= y1 && y < y2;
}
int16_t x1, x2, y1, y2;
int16_t x1 = 0;
int16_t x2 = 0;
int16_t y1 = 0;
int16_t y2 = 0;
};
// Data structures used for pathfinding, can contain cached results.
View
@@ -113,7 +113,7 @@ struct BASE_OBJECT : public SIMPLE_OBJECT
~BASE_OBJECT();
SCREEN_DISP_DATA sDisplay; ///< screen coordinate details
UBYTE group; ///< Which group selection is the droid currently in?
UBYTE group = 0; ///< Which group selection is the droid currently in?
UBYTE selected; ///< Whether the object is selected (might want this elsewhere)
UBYTE visible[MAX_PLAYERS]; ///< Whether object is visible to specific player
UBYTE seenThisTick[MAX_PLAYERS]; ///< Whether object has been seen this tick by the specific player.

0 comments on commit 7af198b

Please sign in to comment.