Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Commit

Permalink
fix: (should have) fixed importing
Browse files Browse the repository at this point in the history
  • Loading branch information
QxQ authored and QxQ committed Dec 14, 2020
1 parent 725ae4c commit 6f4f87e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions core/Serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,20 @@ const QPair<QString, QJsonObject> 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();
Expand Down

0 comments on commit 6f4f87e

Please sign in to comment.