Skip to content

Commit 18042a1

Browse files
authored
Merge pull request #222 from YerongAI/patch-1
Fix CanWrite condition
2 parents c2b8191 + ce1b8db commit 18042a1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Downloader/Chunk.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class Chunk
6060
/// <summary>
6161
/// Gets a value indicating whether more data can be written to this chunk according to the chunk's situation.
6262
/// </summary>
63-
[JsonIgnore] public bool CanWrite => Length <= 0 || Start + Position < End;
63+
[JsonIgnore] public bool CanWrite => Length <= 0 || Start + Position <= End;
6464

6565
/// <summary>
6666
/// Initializes a new instance of the <see cref="Chunk"/> class with default values.
@@ -120,4 +120,4 @@ public bool IsValidPosition()
120120
{
121121
return Length == 0 || (Position >= 0 && Position <= Length);
122122
}
123-
}
123+
}

0 commit comments

Comments
 (0)