]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/bittorrent/bittorrent.factor
core: subseq-index? -> subseq-of?
[factor.git] / extra / bittorrent / bittorrent.factor
index 1509788e66be80368a3f30ec01be05521f575455..624544575eb0cb25d111261d944a6ccc8da65369 100644 (file)
@@ -73,7 +73,7 @@ M: string load-metainfo
     dup "announce-list" of [ nip first random ] [ "announce" of ] if* ;
 
 : scrape-url ( metainfo -- url/f )
-    announce-url "announce" over path>> subseq? [
+    announce-url dup path>>  "announce" subseq-of? [
         [ "announce" "scrape" replace ] change-path
     ] [ drop f ] if ;
 
@@ -425,7 +425,7 @@ M: peer dispose
 :: next-block ( peer -- peer )
     peer current-index>> [ 1 + ] [ 0 ] if*
     peer #pieces>>
-    peer bitfield>> '[ _ check-bitfield ] (find-integer)
+    peer bitfield>> '[ _ check-bitfield ] find-integer-from
     peer current-index<<
     0 peer current-piece>> set-length
     peer ;