Fix a bug where "base" was not set correctly for metatable operations.
This commit is contained in:
@@ -7,6 +7,10 @@ public interface VM {
|
|||||||
|
|
||||||
// ================ interfaces for performing calls
|
// ================ 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
|
/** Push an argument or return value onto the stack
|
||||||
*/
|
*/
|
||||||
public void push( LValue value );
|
public void push( LValue value );
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ public class LFunction extends LValue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void luaSetTable(VM vm, LValue table, LValue key, LValue val) {
|
public void luaSetTable(VM vm, LValue table, LValue key, LValue val) {
|
||||||
|
vm.newCall();
|
||||||
vm.push( this );
|
vm.push( this );
|
||||||
vm.push( table );
|
vm.push( table );
|
||||||
vm.push( key );
|
vm.push( key );
|
||||||
@@ -24,6 +25,7 @@ public class LFunction extends LValue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void luaGetTable(VM vm, LValue table, LValue key) {
|
public void luaGetTable(VM vm, LValue table, LValue key) {
|
||||||
|
vm.newCall();
|
||||||
vm.push( this );
|
vm.push( this );
|
||||||
vm.push( table );
|
vm.push( table );
|
||||||
vm.push( key );
|
vm.push( key );
|
||||||
|
|||||||
Reference in New Issue
Block a user