mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
fixed wip mods crashing joiners
This is a temporary fix for a much larger issue in commit 3dd9226bc9
The problem is data sizes. The min function was being treated as a different data size since its no longer using the type agnostic macros.
This commit is contained in:
parent
e4fd83bec7
commit
e5a51a6687
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ size_t f_read(void *dst, size_t size, size_t count, FILE *f) {
|
|||
file_t *file = f_get_file_from_handle(f);
|
||||
if (!file) return fread(dst, size, count, f);
|
||||
if (file->pos >= file->size) return 0;
|
||||
count = min(count, ((file->size - file->pos) / size));
|
||||
count = MIN(count, ((file->size - file->pos) / size));
|
||||
memcpy(dst, file->data + file->pos, count * size);
|
||||
file->pos += count * size;
|
||||
return count;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue