You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5125,7 +5125,8 @@ Player *ScriptEngine::getPlayerFromAsciiString(const AsciiString& playerString)
5125
5125
elseif (playerString == THIS_PLAYER_ENEMY) {
5126
5126
returngetSkirmishEnemyPlayer();
5127
5127
}
5128
-
else {
5128
+
// TheSuperHackers @bugfix Mauller 01/07/2025 we need to ignore empty player strings as they can return an invalid and uninitialised player from the player list
5129
+
elseif (playerString.isNotEmpty()){
5129
5130
NameKeyType key = NAMEKEY(playerString);
5130
5131
Player *pPlayer = ThePlayerList->findPlayerWithNameKey(key);
Copy file name to clipboardExpand all lines: GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5841,7 +5841,8 @@ Player *ScriptEngine::getPlayerFromAsciiString(const AsciiString& playerString)
5841
5841
elseif (playerString == THIS_PLAYER_ENEMY) {
5842
5842
returngetSkirmishEnemyPlayer();
5843
5843
}
5844
-
else {
5844
+
// TheSuperHackers @bugfix Mauller 01/07/2025 we need to ignore empty player strings as they can return an invalid and uninitialised player from the player list
5845
+
elseif (playerString.isNotEmpty()){
5845
5846
NameKeyType key = NAMEKEY(playerString);
5846
5847
Player *pPlayer = ThePlayerList->findPlayerWithNameKey(key);
0 commit comments