diff options
-rw-r--r-- | script/core/linker.lua | 2 | ||||
-rw-r--r-- | script/core/searcher.lua | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/script/core/linker.lua b/script/core/linker.lua index 3185ecda..ef6dd010 100644 --- a/script/core/linker.lua +++ b/script/core/linker.lua @@ -5,7 +5,7 @@ local vm = require 'vm.vm' local Linkers local LastIDCache = {} local SPLIT_CHAR = '\x1F' -local SPLIT_REGEX = SPLIT_CHAR .. '.-$' +local SPLIT_REGEX = SPLIT_CHAR .. '[^' .. SPLIT_CHAR .. ']+$' local INDEX_CHAR = '\x1E' ---是否是全局变量(包括 _G.XXX 形式) diff --git a/script/core/searcher.lua b/script/core/searcher.lua index c3d61199..f99b3a4b 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -118,11 +118,10 @@ function m.searchRefsByID(status, uri, expect, mode) end local function searchID(id, field) - search(id, field) if field then id = id .. field - search(id) end + search(id) end local function getCallSelectByReturnIndex(func, index) @@ -200,7 +199,7 @@ function m.searchRefsByID(status, uri, expect, mode) stackCount = stackCount + 1 local links = linker.getLinksByID(root, id) if links then - if stackCount >= 20 then + if stackCount >= 100 then error('stack overflow') end for _, eachLink in ipairs(links) do |