Skip to content

Commit

Permalink
Update Source.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGreatSageEqualToHeaven authored Mar 27, 2024
1 parent df7a09a commit 4f38feb
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Source.lua
Original file line number Diff line number Diff line change
Expand Up @@ -689,13 +689,15 @@ local function luau_load(module, env, luau_settings)
local B = inst.B

local kv = inst.K

local sb = stack[B]

stack[A + 1] = sb
stack[A] = sb[kv]


pc += 1 --// adjust for aux


local useFallback = true

--// Special handling for native namecall behaviour
local useNativeHandler = luau_settings.useNativeNamecall

Expand All @@ -714,6 +716,8 @@ local function luau_load(module, env, luau_settings)
)

if ret_list[1] == true then
useFallback = false

if interruptHook then
interruptHook(stack, debugging, proto, module, upvals)
end
Expand Down Expand Up @@ -742,6 +746,10 @@ local function luau_load(module, env, luau_settings)
table_move(ret_list, 1, ret_num, callA, stack)
end
end

if useFallback then
stack[A] = sb[kv]
end
elseif op == 21 then --[[ CALL ]]
if interruptHook then
interruptHook(stack, debugging, proto, module, upvals)
Expand Down

0 comments on commit 4f38feb

Please sign in to comment.