Type size_t is unsigned. Therefore the value std::numeric_limits::max()
casted to a signed type (long long) might be interpreted as -1 (depending on
the system). This causes the length check to fail incorrectly.
The patch fixes an issue that games fail to be loaded from vfs on 64 bit Linux
with the message: 'ERROR: GameClient: Invalid file size XY bytes'
Nice work btw! I hope I got the correct dev branch. If not feel free to cherry-pick wherever this is needed.
Type size_t is unsigned. Therefore the value std::numeric_limits::max()
casted to a signed type (long long) might be interpreted as -1 (depending on
the system). This causes the length check to fail incorrectly.
The patch fixes an issue that games fail to be loaded from vfs on 64 bit Linux with the message: 'ERROR: GameClient: Invalid file size XY bytes'
Nice work btw! I hope I got the correct dev branch. If not feel free to cherry-pick wherever this is needed.