Skip to content

Commit

Permalink
Fix loop if pos count > 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ruti committed Oct 17, 2024
1 parent 13b0048 commit 6dca571
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions desync.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ ssize_t desync(int sfd, char *buffer, size_t bfsize,
int i = 0, r = 0, rc = 0;

for (; r > 0 || i < dp.tlsrec_n; rc++, r--) {
if (!r) {
if (r <= 0) {
part = dp.tlsrec[i];
r = part.r; i++;
}
Expand Down Expand Up @@ -495,7 +495,7 @@ ssize_t desync(int sfd, char *buffer, size_t bfsize,
int i = 0, r = 0;

for (; r > 0 || i < dp.parts_n; r--) {
if (!r) {
if (r <= 0) {
part = dp.parts[i];
r = part.r; i++;
}
Expand Down

0 comments on commit 6dca571

Please sign in to comment.