critical lua fixes
This commit is contained in:
@@ -87,10 +87,12 @@ namespace lua {
|
||||
}
|
||||
|
||||
inline glm::vec2 tovec2(lua_State* L, int idx) {
|
||||
lua_rawgeti(L, idx, 1);
|
||||
lua_pushvalue(L, idx);
|
||||
lua_rawgeti(L, -1, 1);
|
||||
lua::luanumber x = lua_tonumber(L, -1); lua_pop(L, -1);
|
||||
lua_rawgeti(L, idx, 1);
|
||||
lua_rawgeti(L, -2, 2);
|
||||
lua::luanumber y = lua_tonumber(L, -1); lua_pop(L, -1);
|
||||
lua_pop(L, -1);
|
||||
return glm::vec2(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user