Adds a canary byte check before sending game completion (#3217)

This commit is contained in:
digiholic
2024-05-07 01:22:11 -06:00
committed by GitHub
parent 0ac8844f6f
commit 12b8fef1aa

View File

@@ -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