Skip to content

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

@flywith-liang

Description

@flywith-liang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions