File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -123,27 +123,19 @@ public override async ValueTask<int> ResumeAsync(LuaFunctionExecutionContext con
123123 if ( variableArgumentCount > 0 )
124124 {
125125 var fixedArgumentCount = context . ArgumentCount - 1 - variableArgumentCount ;
126+ var args = context . Arguments ;
126127
127- for ( int i = 0 ; i < variableArgumentCount ; i ++ )
128- {
129- Stack . Push ( context . GetArgument ( i + fixedArgumentCount + 1 ) ) ;
130- }
128+ Stack . PushRange ( args . Slice ( 1 + fixedArgumentCount , variableArgumentCount ) ) ;
131129
132130 frameBase = Stack . Count ;
133131
134- for ( int i = 0 ; i < fixedArgumentCount ; i ++ )
135- {
136- Stack . Push ( context . GetArgument ( i + 1 ) ) ;
137- }
132+ Stack . PushRange ( args . Slice ( 1 , fixedArgumentCount ) ) ;
138133 }
139134 else
140135 {
141136 frameBase = Stack . Count ;
142137
143- for ( int i = 0 ; i < context . ArgumentCount - 1 ; i ++ )
144- {
145- Stack . Push ( context . GetArgument ( i + 1 ) ) ;
146- }
138+ Stack . PushRange ( context . Arguments [ 1 ..] ) ;
147139 }
148140
149141 functionTask = Function . InvokeAsync ( new ( )
You can’t perform that action at this time.
0 commit comments