There was an error while loading. Please reload this page.
1 parent d3436fe commit ae6c1c6Copy full SHA for ae6c1c6
1 file changed
extra/bencode/bencode.factor
@@ -1,6 +1,7 @@
1
USING: arrays assocs byte-arrays combinators io
2
io.encodings.binary io.streams.byte-array io.streams.string
3
-kernel linked-assocs math math.parser sequences sequences.extras sorting
+io.streams.throwing kernel linked-assocs math math.parser sequences
4
+sequences.extras sorting
5
strings ;
6
IN: bencode
7
@@ -38,7 +39,7 @@ DEFER: read-bencode
38
39
40
: read-string ( prefix -- obj )
41
":" read-until CHAR: : assert= swap prefix
- string>number read "" like ;
42
+ string>number [ read ] throw-on-eof "" like ;
43
44
PRIVATE>
45
0 commit comments