Skip to content

Commit

Permalink
Merge pull request #66 from heanrum/patch-1
Browse files Browse the repository at this point in the history
修复特定情况下查看函数时可能导致报错
  • Loading branch information
CppCXY committed Jun 3, 2024
2 parents 83a7668 + 9905277 commit b160eeb
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions emmy_debugger/src/debugger/emmy_debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,19 @@ void DisplayFunction(Idx<Variable> variable, lua_State *L, int index) {
lua_pushvalue(L, index);
if (lua_getinfo(L, ">Snu", &ar) == 0) {
variable->value = ToPointer(L, index);
return;
}
switch (luaVersion) {
case LuaVersion::LUA_54: {
DisplayFunction54(variable, L, index, ar.u.ar54);
break;
}
default: {
variable->value = ToPointer(L, index);
break;
else {
switch (luaVersion) {
case LuaVersion::LUA_54: {
DisplayFunction54(variable, L, index, ar.u.ar54);
break;
}
default: {
variable->value = ToPointer(L, index);
break;
}
}
}
}
lua_settop(L, index);
}
#endif
Expand Down Expand Up @@ -1452,4 +1453,4 @@ bool Debugger::RegisterTypeName(const std::string& typeName, std::string& err) {
displayCustomTypeInfo = true;
registeredTypes.set(type);
return true;
}
}

0 comments on commit b160eeb

Please sign in to comment.