Skip to content

Commit a7866d6

Browse files
committed
Re-order comments a bit.
1 parent 26f5d4c commit a7866d6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Generals/Code/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,12 @@ void LANAPI::handleRequestJoin( LANMessage *msg, UnsignedInt senderIP )
290290
#endif
291291

292292
// TheSuperHackers @bugfix slurmlord 18/09/2025 need to validate the name of the connecting player before
293-
// allowing them to join to prevent messing up the format of game state string
293+
// allowing them to join to prevent messing up the format of game state string. Commas, colons, semicolons etc.
294+
// should not be in a player name. It should also not consist of only space characters.
294295
constexpr WideChar IllegalNameChars[] = L",:;|\f\n\r\t\v";
295296
if (canJoin && (wcscspn(msg->name, IllegalNameChars) || wcsspn(msg->name, L" ") == wcslen(msg->name)))
296297
{
297-
// Commas, colons, semicolons etc. should not be in a player name. It should also not consist of only space characters.
298-
// If so, just deny with a duplicate name error (for backwards compatibility with retail)
298+
// Just deny with a duplicate name reason, for backwards compatibility with retail
299299
reply.LANMessageType = LANMessage::MSG_JOIN_DENY;
300300
reply.GameNotJoined.reason = LANAPIInterface::RET_DUPLICATE_NAME;
301301
reply.GameNotJoined.gameIP = m_localIP;

GeneralsMD/Code/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,12 @@ void LANAPI::handleRequestJoin( LANMessage *msg, UnsignedInt senderIP )
291291
#endif
292292

293293
// TheSuperHackers @bugfix slurmlord 18/09/2025 need to validate the name of the connecting player before
294-
// allowing them to join to prevent messing up the format of game state string
294+
// allowing them to join to prevent messing up the format of game state string. Commas, colons, semicolons etc.
295+
// should not be in a player name. It should also not consist of only space characters.
295296
constexpr WideChar IllegalNameChars[] = L",:;|\f\n\r\t\v";
296297
if (canJoin && (wcscspn(msg->name, IllegalNameChars) || wcsspn(msg->name, L" ") == wcslen(msg->name)))
297298
{
298-
// Commas, colons, semicolons etc. should not be in a player name. It should also not consist of only space characters.
299-
// If so, just deny with a duplicate name error (for backwards compatibility with retail)
299+
// Just deny with a duplicate name reason, for backwards compatibility with retail
300300
reply.LANMessageType = LANMessage::MSG_JOIN_DENY;
301301
reply.GameNotJoined.reason = LANAPIInterface::RET_DUPLICATE_NAME;
302302
reply.GameNotJoined.gameIP = m_localIP;

0 commit comments

Comments
 (0)