Adds a canary byte check before sending game completion (#3217)
This commit is contained in:
parent
0ac8844f6f
commit
12b8fef1aa
|
@ -110,6 +110,11 @@ local IsItemable = function()
|
|||
end
|
||||
|
||||
local is_game_complete = function()
|
||||
-- If the Cannary Byte is 0xFF, then the save RAM is untrustworthy
|
||||
if memory.read_u8(canary_byte) == 0xFF then
|
||||
return game_complete
|
||||
end
|
||||
|
||||
-- If on the title screen don't read RAM, RAM can't be trusted yet
|
||||
if IsOnTitle() then return game_complete end
|
||||
|
||||
|
|
Loading…
Reference in New Issue