Skip to content

Commit c73e04a

Browse files
fix end calculation for chunk
1 parent 632b4b8 commit c73e04a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/dart/lib/src/client_browser.dart.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
120120

121121
while (offset < size) {
122122
var chunk;
123-
final end = min(offset + CHUNK_SIZE-1, size-1);
123+
final end = min(offset + CHUNK_SIZE, size);
124124
chunk = file.bytes!.getRange(offset, end).toList();
125125
params[paramName] =
126126
http.MultipartFile.fromBytes(paramName, chunk, filename: file.filename);

0 commit comments

Comments
 (0)