You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-p2p/ctorrent/files/ctorrent-3.3.2-negative-int...

18 lines
442 B

allow negative integers ... should fix random "error, initial meta info failed"
https://sourceforge.net/tracker/?func=detail&aid=3159066&group_id=202532&atid=981959
--- ctorrent-dnh3.3.2/bencode.cpp
+++ ctorrent-dnh3.3.2/bencode.cpp
@@ -44,6 +44,10 @@
p++; len--;
}
+ if( *p == '-'){
+ p++; len--;
+ }
+
for(psave = p; len && isdigit(*p); p++,len--) ;
if(!len || MAX_INT_SIZ < (p - psave) || *p != endchar) return 0;