Skip to content

Commit 2d65488

Browse files
committed
fix meta query error
1 parent 6fb71d9 commit 2d65488

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

emmy_debugger/src/debugger/extension_point.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ int metaAddChild(lua_State *L) {
3030
}
3131

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

5354
int metaNewIndex(lua_State *L) {
54-
auto var = (Variable *) lua_touserdata(L, 1);
55+
auto *pVar = (Idx<Variable> *) lua_touserdata(L, 1);
56+
auto var = *pVar;
5557
const std::string k = lua_tostring(L, 2);
5658
if (k == "name") {
5759
const char *value = lua_tostring(L, 3);

0 commit comments

Comments
 (0)