From 26c0fa89ab3af9d2b150d5dc3ed52858bce2d430 Mon Sep 17 00:00:00 2001
From: Amos <48657826+Mauler125@users.noreply.github.com>
Date: Tue, 22 Feb 2022 15:22:51 +0100
Subject: [PATCH] Add additional check to input address handling in CNetAdr2

---
 r5dev/tier1/NetAdr2.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/r5dev/tier1/NetAdr2.cpp b/r5dev/tier1/NetAdr2.cpp
index 035e056d..42e6b8f0 100644
--- a/r5dev/tier1/NetAdr2.cpp
+++ b/r5dev/tier1/NetAdr2.cpp
@@ -128,7 +128,7 @@ void CNetAdr2::SetIPAndPort(std::string svInAdr, std::string svInPort)
 		svInAdr = "127.0.0.1";
 	}
 
-	if (strstr(svInAdr.c_str(), "["))
+	if (strstr(svInAdr.c_str(), "[") || strstr(svInAdr.c_str(), "]"))
 	{
 		svInAdr = GetBase(svInAdr);
 	}