Fix a bug where "base" was not set correctly for metatable operations.

This commit is contained in:
Ian Farmer
2007-09-03 05:53:55 +00:00
parent b8571b93f9
commit 49bcc0d2f8
2 changed files with 6 additions and 0 deletions

View File

@@ -7,6 +7,10 @@ public interface VM {
// ================ interfaces for performing calls
/** Prepare the VM stack for a new call with arguments to be pushed
*/
public void newCall();
/** Push an argument or return value onto the stack
*/
public void push( LValue value );

View File

@@ -12,6 +12,7 @@ public class LFunction extends LValue {
}
public void luaSetTable(VM vm, LValue table, LValue key, LValue val) {
vm.newCall();
vm.push( this );
vm.push( table );
vm.push( key );
@@ -24,6 +25,7 @@ public class LFunction extends LValue {
}
public void luaGetTable(VM vm, LValue table, LValue key) {
vm.newCall();
vm.push( this );
vm.push( table );
vm.push( key );