1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-05 02:39:41 +01:00

Fix return value of PHYSFS_readBytes() being stored in a smaller size

PHYSFS_readBytes() returns a PHYSFS_sint64, but we forcefully shove it
into a 32-bit signed integer.

Fixing the type of this doesn't have any immediate consequences, but
it's good for the future in case we want to use the return value for
files bigger than 2 gigabytes; it doesn't harm us in any way, and it's
just better housekeeping.
This commit is contained in:
Misa 2021-03-04 14:56:46 -08:00 committed by Ethan Lee
parent 5af570e75b
commit 7316833f95

View file

@ -386,7 +386,7 @@ void FILESYSTEM_loadFileToMemory(
VVV_exit(1);
}
}
int success = PHYSFS_readBytes(handle, *mem, length);
PHYSFS_sint64 success = PHYSFS_readBytes(handle, *mem, length);
if (success == -1)
{
FILESYSTEM_freeMemory(mem);