Initialize bx1/by1/bx2/by2 in custom entity creation

When I compile in release mode, GCC complains that these variables MAY
be uninitialized when it comes time to create the moving platform
entity. I can't think of any way that it could be uninitialized and
testing my release build seemed to be fine, but I'm initializing these
variables just to be sure.
This commit is contained in:
Misa authored and Ethan Lee committed 2020-08-02 23:57:55 -04:00
1 parent a35bc9d8dc
commit 70ad0003e1
1 file changed
+1 -1
+1 -1
View File
@@ -1721,7 +1721,7 @@ void mapclass::loadlevel(int rx, int ry)
const int ey = (ent.y % 30) * 8;
// Platform and enemy bounding boxes
int bx1, by1, bx2, by2;
int bx1 = 0, by1 = 0, bx2 = 0, by2 = 0;
if (ent.t == 1 || (ent.t == 2 && ent.p1 <= 4))
{