diff options
Diffstat (limited to 'script/vm/function.lua')
-rw-r--r-- | script/vm/function.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/script/vm/function.lua b/script/vm/function.lua index 9efcbd32..bdb70faf 100644 --- a/script/vm/function.lua +++ b/script/vm/function.lua @@ -113,8 +113,13 @@ function vm.countReturnsOfFunction(func, mark) end end end - if lastReturn and lastReturn.types[1][1] == '...' then - dmax = math.huge + if lastReturn then + if lastReturn.types[1][1] == '...' then + dmax = math.huge + end + if lastReturn.name and lastReturn.name[1] == '...' then + dmax = math.huge + end end if dmin and (not min or (dmin < min)) then min = dmin |