Skip to content

Commit 12b8fef

Browse files
authored
Adds a canary byte check before sending game completion (#3217)
1 parent 0ac8844 commit 12b8fef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

data/lua/connector_mmbn3.lua

+5
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ local IsItemable = function()
110110
end
111111

112112
local is_game_complete = function()
113+
-- If the Cannary Byte is 0xFF, then the save RAM is untrustworthy
114+
if memory.read_u8(canary_byte) == 0xFF then
115+
return game_complete
116+
end
117+
113118
-- If on the title screen don't read RAM, RAM can't be trusted yet
114119
if IsOnTitle() then return game_complete end
115120

0 commit comments

Comments
 (0)