From 6f4f87e3377ec3bb335d87464806edaad92bd639 Mon Sep 17 00:00:00 2001 From: QxQ <59914293+U-v-U@users.noreply.github.com> Date: Mon, 14 Dec 2020 20:29:15 +0800 Subject: [PATCH] fix: (should have) fixed importing --- core/Serializer.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/core/Serializer.cpp b/core/Serializer.cpp index 2d06583..df22467 100644 --- a/core/Serializer.cpp +++ b/core/Serializer.cpp @@ -47,15 +47,20 @@ const QPair SSRSerializer::DeserializeOutbound(const QStri // params_dict = ParseParam(data.mid(param_start_pos + 1)); data = data.mid(0, param_start_pos); } + if (data.indexOf("/") >= 0) { data = data.mid(0, data.lastIndexOf("/")); } -#pragma message "Possible: Breaking Changes" - const auto matched = regex.match(data); - const auto list = regex.namedCaptureGroups(); - if (matched.hasMatch() && list.count() == 7) + const auto match = regex.match(data); + const auto hasmatch = match.hasMatch(); + QStringList list; + for (auto i = 0; i <= regex.captureCount(); i++) + { + list << match.captured(i); + } + if (hasmatch && list.count() == 7) { server.address = list[1]; server.port = list[2].toInt();