mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Adds a canary byte check before sending game completion (#3217)
This commit is contained in:
@@ -110,6 +110,11 @@ local IsItemable = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local is_game_complete = function()
|
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 on the title screen don't read RAM, RAM can't be trusted yet
|
||||||
if IsOnTitle() then return game_complete end
|
if IsOnTitle() then return game_complete end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user