1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-10 13:09:43 +01:00

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 2020-08-02 20:43:50 -07:00 committed by Ethan Lee
parent a35bc9d8dc
commit 70ad0003e1

View file

@ -1721,7 +1721,7 @@ void mapclass::loadlevel(int rx, int ry)
const int ey = (ent.y % 30) * 8; const int ey = (ent.y % 30) * 8;
// Platform and enemy bounding boxes // 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)) if (ent.t == 1 || (ent.t == 2 && ent.p1 <= 4))
{ {