sol
sol copied to clipboard
Seems to be a bug/ stack.hpp line 217 getter function
template<typename T> struct getter<T&> { static T& get(lua_State* L, int index = -1) { void* udata = lua_touserdata(L, index); T** obj = static_cast<T**>(udata); return **obj; } };
after:
template<typename T> struct getter<T&> { static T& get(lua_State* L, int index = -1) { void* udata = lua_touserdata(L, index); T* obj = static_cast<T*>(udata); // here change return *obj; // here change } };