Fix buffer overflow in case of very long cheats.txt file

This commit is contained in:
Duckbill 2017-12-31 11:26:18 +03:00
parent b379d83469
commit fd80294bf2

View File

@ -866,8 +866,8 @@ void Cheat_loadCheatsIntoMemory(u64 titleId) {
u64 fileLen = 0;
IFile_GetSize(&file, &fileLen);
if (fileLen > 16384) {
fileLen = 16384;
if (fileLen > 16383) {
fileLen = 16383;
}
u64 total;