From 711014687392bef5dea9a2d4d07344165e63fde8 Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Mon, 10 Feb 2020 21:14:42 +0800 Subject: [PATCH] Fix empty lines in rulesets not being removed --- src/subexport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subexport.cpp b/src/subexport.cpp index a992fcd..6003338 100644 --- a/src/subexport.cpp +++ b/src/subexport.cpp @@ -324,9 +324,9 @@ void rulesetToClash(YAML::Node &base_rule, std::vector &ruleset while(getline(strStrm, strLine, delimiter)) { lineSize = strLine.size(); + strLine = replace_all_distinct(strLine, "\r", ""); //remove line break if(!lineSize || strLine[0] == ';' || strLine[0] == '#' || (lineSize >= 2 && strLine[0] == '/' && strLine[1] == '/')) //empty lines and comments are ignored continue; - strLine = replace_all_distinct(strLine, "\r", ""); //remove line break if(strLine.find("USER-AGENT") == 0 || strLine.find("URL-REGEX") == 0 || strLine.find("PROCESS-NAME") == 0 || strLine.find("AND") == 0 || strLine.find("OR") == 0) //remove unsupported types continue; /*