mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-01 17:25:02 +00:00
Fix a bug
Fix a crash when no nodes are found when generating Quantumult (X) node lists.
This commit is contained in:
1 file changed
+6
-2
+6
-2
@@ -1415,8 +1415,10 @@ std::string netchToQuan(std::vector<nodeInfo> &nodes, std::string &base_conf, st
|
||||
if(ext.nodelist)
|
||||
{
|
||||
string_array allnodes;
|
||||
std::string allLinks;
|
||||
ini.GetAll("SERVER", "{NONAME}", allnodes);
|
||||
std::string allLinks = std::accumulate(std::next(allnodes.begin()), allnodes.end(), allnodes[0], [](std::string a, std::string b)
|
||||
if(allnodes.size())
|
||||
allLinks = std::accumulate(std::next(allnodes.begin()), allnodes.end(), allnodes[0], [](std::string a, std::string b)
|
||||
{
|
||||
return std::move(a) + "\n" + std::move(b);
|
||||
});
|
||||
@@ -1639,8 +1641,10 @@ std::string netchToQuanX(std::vector<nodeInfo> &nodes, std::string &base_conf, s
|
||||
if(ext.nodelist)
|
||||
{
|
||||
string_array allnodes;
|
||||
std::string allLinks;
|
||||
ini.GetAll("server_local", "{NONAME}", allnodes);
|
||||
std::string allLinks = std::accumulate(std::next(allnodes.begin()), allnodes.end(), allnodes[0], [](std::string a, std::string b)
|
||||
if(allnodes.size())
|
||||
allLinks = std::accumulate(std::next(allnodes.begin()), allnodes.end(), allnodes[0], [](std::string a, std::string b)
|
||||
{
|
||||
return std::move(a) + "\n" + std::move(b);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user