Skip to content

Commit a47b07d

Browse files
[Issue GerryFerdinandus#10] Can't open large torrent file.
Bencode routine does not accept string size larger than 6 digits = 1MB. Is now increased to 10MB.
1 parent aae2e27 commit a47b07d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/bencode.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ constructor TBEncoded.Create(Stream: TStream);
116116
begin
117117
if Buffer = '' then
118118
raise Exception.Create('');
119-
if Length(Buffer) > 6 then
119+
if Length(Buffer) > 7 then
120120
raise Exception.Create('');
121121
SetLength(Result, StrToInt(Buffer));
122122
if Stream.Read(Result[1], Length(Result)) <> Length(Result) then

0 commit comments

Comments
 (0)