Skip to content

Commit

Permalink
fix meta query error
Browse files Browse the repository at this point in the history
  • Loading branch information
CppCXY committed Jun 21, 2023
1 parent 6fb71d9 commit 2d65488
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions emmy_debugger/src/debugger/extension_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ int metaAddChild(lua_State *L) {
}

int metaIndex(lua_State *L) {
const Variable *var = (Variable *) lua_touserdata(L, 1);
auto *pVar = (Idx<Variable> *) lua_touserdata(L, 1);
auto var = *pVar;
const std::string k = lua_tostring(L, 2);
if (k == "name") {
lua_pushstring(L, var->name.c_str());
Expand All @@ -51,7 +52,8 @@ int metaIndex(lua_State *L) {
}

int metaNewIndex(lua_State *L) {
auto var = (Variable *) lua_touserdata(L, 1);
auto *pVar = (Idx<Variable> *) lua_touserdata(L, 1);
auto var = *pVar;
const std::string k = lua_tostring(L, 2);
if (k == "name") {
const char *value = lua_tostring(L, 3);
Expand Down

0 comments on commit 2d65488

Please sign in to comment.