From 4b234fc26ae50176b24b9b3f33944782c3faa4fb Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Wed, 30 Dec 2015 02:35:58 -0800 Subject: [PATCH] little tweaks --- Lua/epona monitor.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lua/epona monitor.lua b/Lua/epona monitor.lua index 87190f5..8078bba 100644 --- a/Lua/epona monitor.lua +++ b/Lua/epona monitor.lua @@ -13,7 +13,7 @@ while true do for at, ai, addr in iter_actors() do local actor_number = R2(addr) - local name = actor_names[actor_number] + local name = actor_names[actor_number] or "[error]" local size = R4(addr - 0xC) -- read linked list data above the actor if actor_number == 0x00D then epona_addr = addr @@ -23,7 +23,7 @@ while true do local diff = addr - epona_addr if diff >= 0 and diff < offset then offset = diff - nearest.name = name or "[error]" + nearest.name = name nearest.addr = addr nearest.at = at nearest.ai = ai @@ -41,6 +41,7 @@ while true do T_BR(0, 0, 'white', 'Type, Index: %2i, %2i', nearest.at, nearest.ai) else T_BR(0, 0, 'yellow', 'Epona not found') + epona_addr = nil end emu.frameadvance()