From: P2P-Next Date: Sat, 14 Aug 2010 14:00:04 +0000 (+0300) Subject: instrumentation/hrktorrent: correct ipfilter parser X-Git-Tag: next-share-m32~8 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=d79bf2e7330d409356672b2cf8f816e4a722753c;p=cs-p2p-next.git instrumentation/hrktorrent: correct ipfilter parser --- diff --git a/instrumentation/hrktorrent/ipfilter.cpp b/instrumentation/hrktorrent/ipfilter.cpp index d320cf9..fcd37bc 100644 --- a/instrumentation/hrktorrent/ipfilter.cpp +++ b/instrumentation/hrktorrent/ipfilter.cpp @@ -75,11 +75,11 @@ CIPFilter::ParseFilterLine(std::string line) std::string::size_type loc2 = line.find_first_of(","); start.assign(line); - start.resize(loc-1); + start.resize(loc); end.assign(line); - end.erase(0,loc+2); - end.resize(loc-1); + end.erase(0,loc+1); + end.resize(loc2-loc-1); if(!AddRule(start,end)) Core->VerbosePrint("Settings", "Error adding line to ip filter.");