Skip to content

Commit da49273

Browse files
committed
fixed logic error
1 parent 926f258 commit da49273

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Http.Extensions/src/SendFileResponseExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ private static void CheckRange(long offset, long? count, long fileLength)
128128
ArgumentOutOfRangeException.ThrowIfGreaterThan(offset, fileLength);
129129
if (count is {} countValue)
130130
{
131-
ArgumentOutOfRangeException.ThrowIfGreaterThan(countValue, countValue, nameof(count));
131+
ArgumentOutOfRangeException.ThrowIfGreaterThan(countValue, fileLength - offset, nameof(count));
132132
}
133133
}
134134
}

0 commit comments

Comments
 (0)