aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.c')
-rw-r--r--src/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.c b/src/net.c
index 1484cfb..7278218 100644
--- a/src/net.c
+++ b/src/net.c
@@ -188,7 +188,7 @@ int net_recv(int fd, void *buf, size_t size)
ssize_t read_total = 0;
while ((size_t)read_total < size) {
- ssize_t read_now = read(fd, buf, size);
+ ssize_t read_now = read(fd, (unsigned char *)buf + read_total, size - read_total);
if (!read_now)
break;