Skip to content

Commit

Permalink
calculate remaining afterwards
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Hathcock committed Apr 10, 2024
1 parent fdfaa8a commit eab97a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SharpCompress/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ public static long TransferTo(this Stream source, Stream destination, int size)
{
destination.Write(array, 0, count);
total += count;
remaining -= count;
if (remaining - count < 0)
{
break;
}
remaining -= count;
}
return total;
}
Expand Down

0 comments on commit eab97a3

Please sign in to comment.