if exe.t_size is larger than the actual exe file, then set t_size to the exe file size. this allows to run several demo programs that previously didn't start.

This commit is contained in:
spacepaw 2021-01-09 18:29:50 +01:00 committed by Jakub Czekański
parent 04437eb5a2
commit aa190fea15

View file

@ -443,7 +443,7 @@ bool System::loadExeFile(const std::vector<uint8_t>& _exe) {
if (exe.t_size > _exe.size() - 0x800) {
fmt::print("Invalid exe t_size: 0x{:08x}\n", exe.t_size);
return false;
exe.t_size = _exe.size() - 0x800;
}
for (uint32_t i = 0; i < exe.t_size; i++) {