Files
GameHackingBook-GameHacking…/LuaScripts/Chapter5_CountLinkedListNodes.lua
T

9 lines
235 B
Lua

function countLinkedListNodes(nodeAddress)
local counter = 0
local next = readInteger(nodeAddress)
while (next ~= nodeAddress) do
counter = counter + 1
next = readInteger(next)
end
return counter
end