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 d320cf9..fcd37bc 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