]> p2p-next.cs.pub.ro Git - cs-p2p-next.git/commitdiff
instrumentation/hrktorrent: correct ipfilter parser
authorP2P-Next <p2p-next@cs.pub.ro>
Sat, 14 Aug 2010 14:00:04 +0000 (17:00 +0300)
committerP2P-Next <p2p-next@cs.pub.ro>
Sat, 14 Aug 2010 14:00:04 +0000 (17:00 +0300)
instrumentation/hrktorrent/ipfilter.cpp

index d320cf96af87a2c65bb7bbaea591520b3bbcbc8c..fcd37bc20f64fcdb17eb48bb586827827f4a83f0 100644 (file)
@@ -75,11 +75,11 @@ CIPFilter::ParseFilterLine(std::string line)
        std::string::size_type loc2 = line.find_first_of(",");\r
 \r
        start.assign(line);\r
-       start.resize(loc-1);\r
+       start.resize(loc);\r
 \r
        end.assign(line);\r
-       end.erase(0,loc+2);\r
-       end.resize(loc-1);\r
+       end.erase(0,loc+1);\r
+       end.resize(loc2-loc-1);\r
 \r
        if(!AddRule(start,end))\r
                Core->VerbosePrint("Settings", "Error adding line to ip filter.");\r