stand/lua: Allow menu items to not have explicit aliases

This will generally be used for cases like "Back to main menu" that already
have global aliases installed.
This commit is contained in:
Kyle Evans 2018-02-16 04:44:47 +00:00
parent b1b1f2b8fd
commit 196ba16663

View File

@ -173,8 +173,10 @@ function drawer.drawmenu(m)
-- fill the alias table
alias_table[tostring(entry_num)] = e;
for n, a in ipairs(e.alias) do
alias_table[a] = e;
if (e.alias ~= nil) then
for n, a in ipairs(e.alias) do
alias_table[a] = e;
end
end
else
screen.setcursor(x, y + line_num);