Skip to content
Snippets Groups Projects
Commit 8c4af199 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

*Sigh* Borland.

parent 2f78d960
No related branches found
No related tags found
1 merge request!488Overhaul LZH code
Pipeline #7544 passed
......@@ -181,11 +181,11 @@ off_t sendfilesocket(int sock, int file, off_t *offset, off_t count)
while (total < count) {
ssize_t rd = read(file, buf, sizeof(buf));
ssize_t sent = 0;
if (rd < 0) // Error
return(-1);
if (rd == 0) // EOF
break;
ssize_t sent = 0;
while (sent < rd) {
ssize_t wr = sendsocket(sock, buf + sent, rd - sent);
if (wr > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment