Skip to content

Commit

Permalink
Adds a canary byte check before sending game completion (ArchipelagoM…
Browse files Browse the repository at this point in the history
  • Loading branch information
digiholic authored and James Schurig committed Jun 13, 2024
1 parent bf308f1 commit a6338fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions data/lua/connector_mmbn3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a6338fc

Please sign in to comment.