From 44f5ae0f4b93e229bfdfcc037c852bf200c061bf Mon Sep 17 00:00:00 2001 From: SherkeyXD <253294679@qq.com> Date: Tue, 3 Oct 2023 01:53:02 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=90=8D=E4=BD=BF=E5=85=B6=E6=9B=B4=E7=9B=B4=E8=A7=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Main/AsstProxy.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs index 48385c4c3e..d8e85fa430 100644 --- a/src/MaaWpfGui/Main/AsstProxy.cs +++ b/src/MaaWpfGui/Main/AsstProxy.cs @@ -1273,14 +1273,14 @@ namespace MaaWpfGui.Main } // normal -> [host]:[port] - string[] addresses = address.Split(':'); - if (addresses.Length != 2) + string[] host_and_port = address.Split(':'); + if (host_and_port.Length != 2) { return false; } - string host = addresses[0].Equals("emulator") ? "127.0.0.1" : addresses[0]; - if (!int.TryParse(addresses[1], out int port)) + string host = host_and_port[0].Equals("emulator") ? "127.0.0.1" : host_and_port[0]; + if (!int.TryParse(host_and_port[1], out int port)) { return false; }