mirror of
https://github.com/hufrea/byedpi.git
synced 2024-12-22 14:25:44 +00:00
Fix loop if pos count > 1
This commit is contained in:
parent
13b0048514
commit
6dca571567
4
desync.c
4
desync.c
@ -461,7 +461,7 @@ ssize_t desync(int sfd, char *buffer, size_t bfsize,
|
|||||||
int i = 0, r = 0, rc = 0;
|
int i = 0, r = 0, rc = 0;
|
||||||
|
|
||||||
for (; r > 0 || i < dp.tlsrec_n; rc++, r--) {
|
for (; r > 0 || i < dp.tlsrec_n; rc++, r--) {
|
||||||
if (!r) {
|
if (r <= 0) {
|
||||||
part = dp.tlsrec[i];
|
part = dp.tlsrec[i];
|
||||||
r = part.r; i++;
|
r = part.r; i++;
|
||||||
}
|
}
|
||||||
@ -495,7 +495,7 @@ ssize_t desync(int sfd, char *buffer, size_t bfsize,
|
|||||||
int i = 0, r = 0;
|
int i = 0, r = 0;
|
||||||
|
|
||||||
for (; r > 0 || i < dp.parts_n; r--) {
|
for (; r > 0 || i < dp.parts_n; r--) {
|
||||||
if (!r) {
|
if (r <= 0) {
|
||||||
part = dp.parts[i];
|
part = dp.parts[i];
|
||||||
r = part.r; i++;
|
r = part.r; i++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user