Fix incorrect stack indexes
This commit is contained in:
parent
eed57c7663
commit
5facacaf20
|
@ -572,13 +572,13 @@ impl LuaState {
|
||||||
},
|
},
|
||||||
"boolean" => {
|
"boolean" => {
|
||||||
self.push_value(index);
|
self.push_value(index);
|
||||||
let boolean = self.get_boolean(index);
|
let boolean = self.get_boolean(-1);
|
||||||
self.pop();
|
self.pop();
|
||||||
format!("{}", boolean)
|
format!("{}", boolean)
|
||||||
},
|
},
|
||||||
"number" => {
|
"number" => {
|
||||||
self.push_value(index);
|
self.push_value(index);
|
||||||
let n = self.to_number(index);
|
let n = self.to_number(-1);
|
||||||
self.pop();
|
self.pop();
|
||||||
format!("{}", n)
|
format!("{}", n)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue