Skip to content

Commit

Permalink
Don't include empty names for the router to accept/reject
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed May 3, 2024
1 parent c93f045 commit c547df0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions router/router.cpp
Expand Up @@ -301,7 +301,8 @@ void LoadDriverList()
while(!namelist.empty())
{
auto seppos = namelist.find(',');
gAcceptList.emplace_back(namelist.substr(0, seppos));
if(seppos > 0)
gAcceptList.emplace_back(namelist.substr(0, seppos));
if(seppos < namelist.size())
namelist.remove_prefix(seppos+1);
else
Expand All @@ -314,7 +315,8 @@ void LoadDriverList()
while(!namelist.empty())
{
auto seppos = namelist.find(',');
gRejectList.emplace_back(namelist.substr(0, seppos));
if(seppos > 0)
gRejectList.emplace_back(namelist.substr(0, seppos));
if(seppos < namelist.size())
namelist.remove_prefix(seppos+1);
else
Expand Down

0 comments on commit c547df0

Please sign in to comment.