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
+3 -1
View File
@@ -87,8 +87,10 @@ deserialize_callback(char *dst, int num, void *data)
int copied = 0;
while (copied < num) {
int ret = file_read(rsc->handle, dst + copied, num - copied);
if (ret <= 0)
if (ret < 0)
return -1;
if (ret == 0)
break;
copied += ret;
}
return copied;