Skip to content

Commit

Permalink
Update automap.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 committed Feb 13, 2025
1 parent 0397436 commit 64335a6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Source/automap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1411,11 +1411,10 @@ void DrawAutomapText(const Surface &out)

if (gbIsMultiplayer) {
if (GameName != "0.0.0.0" && !IsLoopback) {
// Check if GameName is an IP address
std::regex ipRegex(
R"((\d{1,3}\.){3}\d{1,3})"); // Basic IPv4 regex (not fully strict)
R"((\d{1,3}\.){3}\d{1,3})");

if (!std::regex_match(GameName, ipRegex)) { // Only show if not an IP
if (!std::regex_match(GameName, ipRegex)) {
std::string description = std::string(_("Game: "));
description.append(GameName);
DrawString(out, description, linePosition);
Expand Down

0 comments on commit 64335a6

Please sign in to comment.