From 7316833f95c04d55dbd6c16a5e1fb96d72985d1c Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 4 Mar 2021 14:56:46 -0800 Subject: [PATCH] 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. --- desktop_version/src/FileSystemUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp index cda6924c..4a17497f 100644 --- a/desktop_version/src/FileSystemUtils.cpp +++ b/desktop_version/src/FileSystemUtils.cpp @@ -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);