Files
VVVVVV/desktop_version/src
Misa 8036471e76 Handle cases where less bytes are read than expected
This checks the return value of PHYSFS_readBytes() in all cases, and
uses a wrapper to not duplicate common logic. If the read fails, then it
will vlog an error, else if the amount of bytes read was less than
expected, it will vlog a warning.

Additionally, the space allocated for a file in
FILESYSTEM_loadFileToMemory is SDL_calloc()ed instead of SDL_malloc()ed
so if there are less bytes than expected, the memory will at least be
zeroed. This also means we don't have to do the null termination,
because the last byte will already be zeroed.

The return value of PHYSFS_readBytes() when reading the headers of
binary blobs now assigns to `header->size`, so the call has been placed
after the increment to `offset` because `offset` needs the correct (i.e.
intended) size of the header.
2023-05-15 17:37:07 -07:00
..
2023-03-29 13:48:44 -07:00
2023-02-21 12:28:57 -08:00
2023-04-02 23:48:09 -07:00
2023-04-02 23:48:09 -07:00
2021-12-18 00:01:32 -08:00
2021-09-27 10:32:23 -07:00
2022-12-31 20:04:56 -08:00
2022-03-13 23:50:37 -07:00
2023-03-21 19:59:48 -07:00
2023-03-02 22:58:12 -08:00
2022-08-23 00:00:39 -07:00
2023-03-21 15:41:49 -07:00
2023-05-08 12:49:05 -07:00
2023-05-08 12:49:05 -07:00
2022-12-31 20:04:56 -08:00
2021-09-24 16:37:27 -07:00
2022-12-29 16:13:54 -08:00
2023-02-27 23:00:41 -08:00
2023-02-27 23:00:41 -08:00
2023-03-21 19:59:48 -07:00
2022-11-14 19:40:23 -08:00
2020-11-04 12:06:57 -05:00
2022-11-14 13:14:25 -08:00