sol icon indicating copy to clipboard operation
sol copied to clipboard

Seems to be a bug/ stack.hpp line 217 getter function

Open flywith-liang opened this issue 7 years ago • 0 comments

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 } };

flywith-liang avatar Oct 26 '17 08:10 flywith-liang