Bug fixes

This commit is contained in:
2025-11-17 23:07:50 +01:00
parent dabd337bb8
commit 690a950e71
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -587,7 +587,7 @@ static int setup_poll_array(void **contexts, struct pollfd *polled)
switch (desc->type) { switch (desc->type) {
case DESC_FILE: case DESC_FILE:
assert(0); // TODO: error // Ignore
break; break;
case DESC_SOCKET: case DESC_SOCKET:
+3 -1
View File
@@ -87,8 +87,10 @@ deserialize_callback(char *dst, int num, void *data)
int copied = 0; int copied = 0;
while (copied < num) { while (copied < num) {
int ret = file_read(rsc->handle, dst + copied, num - copied); int ret = file_read(rsc->handle, dst + copied, num - copied);
if (ret <= 0) if (ret < 0)
return -1; return -1;
if (ret == 0)
break;
copied += ret; copied += ret;
} }
return copied; return copied;