Skip to content

Commit bf30c3c

Browse files
authored
[GEN][ZH] Fix incorrectly initialized bool GhostObject::m_parentGeometryIsSmall (#767)
1 parent 6ae9eba commit bf30c3c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Generals/Code/GameEngine/Source/GameLogic/Object/GhostObject.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ GhostObject::GhostObject(void):
4242
//Added By Sadullah Nader
4343
//Initializations missing and needed
4444
m_parentAngle(0.0f),
45-
m_parentGeometryIsSmall(0.0f),
45+
// TheSuperHackers @bugfix tomsons26 26/04/2025 Change initialization of m_parentGeometryIsSmall from 0.0f.
46+
// Assigning a float to a bool results in the compiler using a random 1 byte value to assign to the bool.
47+
// @todo Change initialization to 'false' when applicable.
48+
m_parentGeometryIsSmall(true),
4649
m_parentGeometryMajorRadius(0.0f),
4750
m_parentGeometryminorRadius(0.0f),
4851
m_parentObject(NULL),

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/GhostObject.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ GhostObject::GhostObject(void):
4242
//Added By Sadullah Nader
4343
//Initializations missing and needed
4444
m_parentAngle(0.0f),
45-
m_parentGeometryIsSmall(0.0f),
45+
// TheSuperHackers @bugfix tomsons26 26/04/2025 Change initialization of m_parentGeometryIsSmall from 0.0f.
46+
// Assigning a float to a bool results in the compiler using a random 1 byte value to assign to the bool.
47+
// @todo Change initialization to 'false' when applicable.
48+
m_parentGeometryIsSmall(true),
4649
m_parentGeometryMajorRadius(0.0f),
4750
m_parentGeometryminorRadius(0.0f),
4851
m_parentObject(NULL),

0 commit comments

Comments
 (0)