Fix incorrect stack indexes

This commit is contained in:
William Venner 2022-01-04 21:56:40 +00:00
parent eed57c7663
commit 5facacaf20
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}, },