fix indentation when puking up a linked list

This commit is contained in:
Kistaro Windrider 2023-09-30 14:00:53 -07:00
parent 8fb54ede26
commit a4bf3f616a
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -310,10 +310,10 @@ function puke(item, indent, seen, hidekey)
end end
if item.is_linked_list then if item.is_linked_list then
local ret,n = "linked_list <",0 local ret,n,xpfx = "linked_list <",0,pfx.." "
item:strip(function(x) item:strip(function(x)
n += 1 n += 1
ret ..= pfx..tostr(n)..": "..puke(x, indent+1, seen, "next") ret ..= xpfx..tostr(n)..": "..puke(x, indent+1, seen, "next")
end) end)
return ret..pfx..">" return ret..pfx..">"
end end