mirror of
https://github.com/LazyDuchess/OpenTS2.git
synced 2025-01-22 16:21:47 -05:00
Lua 5.0: Fix for loop for tables
This commit is contained in:
parent
f653782fcd
commit
3d56d8a924
1 changed files with 6 additions and 0 deletions
|
@ -41,6 +41,12 @@ namespace OpenTS2.Lua.Disassembly.OpCodes
|
|||
|
||||
public override void Disassemble(LuaC50.Context context)
|
||||
{
|
||||
context.Code.WriteLine("if type(" + context.R(A) + ") == \"table\" then");
|
||||
context.Code.Indentation++;
|
||||
context.Code.WriteLine(context.R((ushort)(A + 1)) + " = " + context.R(A));
|
||||
context.Code.WriteLine(context.R(A) + " = next");
|
||||
context.Code.Indentation--;
|
||||
context.Code.WriteEnd();
|
||||
context.Code.WriteLine("for "+ context.R((ushort)(A + 2)) + ", "+ context.R((ushort)(A + 3)) + " in "+ context.R(A) + ", "+ context.R((ushort)(A + 1)) + " do");
|
||||
context.Code.Indentation++;
|
||||
//context.Code.WriteLine("-- A: " + A);
|
||||
|
|
Loading…
Reference in a new issue