Check if it returns nothing. AOBScan returns nil on no results found
Other tweaks:
Use local variables
Use AOBScanUnique if you assume the pattern is unique (this returns an integer, not a stringlist)
"+r" isn't a protection specifier
Code:
...
function aob_register(sym, pat)
local addy = AOBScanUnique(pat, "+w")
if not addy then return end
unregisterSymbol(sym)
registerSymbol(sym, addy)
end
...
_________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum