Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Fix null dereference #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions GoA RAM Non-Rando.lua
Original file line number Diff line number Diff line change
Expand Up @@ -739,13 +739,17 @@ if true then --No Valor, Wisdom, Master, or Final
local CurSubmenu
if Platform == 0 then
CurSubmenu = ReadInt(Menu2)
CurSubmenu = ReadByte(CurSubmenu)
if CurSubmenu ~= 0 then
CurSubmenu = ReadByte(CurSubmenu)
end
elseif Platform == 1 then
CurSubmenu = ReadLong(Menu2)
if ENGINE_VERSION < 5.0 then
CurSubmenu = ReadByteA(CurSubmenu)
else
CurSubmenu = ReadByte(CurSubmenu,true)
if CurSubmenu ~= 0 then
if ENGINE_VERSION < 5.0 then
CurSubmenu = ReadByteA(CurSubmenu)
else
CurSubmenu = ReadByte(CurSubmenu,true)
end
end
end
if CurSubmenu == 7 and ReadByte(Save+0x36C0)&0x56 == 0x00 then --In Summon menu without Forms
Expand Down
14 changes: 9 additions & 5 deletions GoA RAM.lua
Original file line number Diff line number Diff line change
Expand Up @@ -759,13 +759,17 @@ if true then --No Valor, Wisdom, Master, or Final
local CurSubmenu
if Platform == 0 then
CurSubmenu = ReadInt(Menu2)
CurSubmenu = ReadByte(CurSubmenu)
if CurSubmenu ~= 0 then
CurSubmenu = ReadByte(CurSubmenu)
end
elseif Platform == 1 then
CurSubmenu = ReadLong(Menu2)
if ENGINE_VERSION < 5.0 then
CurSubmenu = ReadByteA(CurSubmenu)
else
CurSubmenu = ReadByte(CurSubmenu,true)
if CurSubmenu ~= 0 then
if ENGINE_VERSION < 5.0 then
CurSubmenu = ReadByteA(CurSubmenu)
else
CurSubmenu = ReadByte(CurSubmenu,true)
end
end
end
if CurSubmenu == 7 and ReadByte(Save+0x36C0)&0x56 == 0x00 then --In Summon menu without Forms
Expand Down