fix(lua): don't remove first char of non-file stacktrace source (#37008)

This commit is contained in:
zeertzjq
2025-12-18 08:09:16 +08:00
parent df9452ea9e
commit 275c769f01
4 changed files with 4 additions and 4 deletions

View File

@@ -492,7 +492,7 @@ function M._profile(opts)
if opts and opts.loaders then
for l, loader in pairs(loaders) do
local loc = debug.getinfo(loader, 'Sn').source:sub(2)
local loc = debug.getinfo(loader, 'Sn').source:gsub('^@', '')
loaders[l] = track('loader ' .. l .. ': ' .. loc, loader)
end
end