Skip to content

Commit

Permalink
fix: Context_get
Browse files Browse the repository at this point in the history
修复context:get函数异常
  • Loading branch information
mystringEmpty committed Apr 4, 2024
1 parent 494ee39 commit e44149d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dice/DiceLua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ int Context_format(lua_State* L) {
return 1;
}
int Context_get(lua_State* L) {
AttrObject obj{ lua_isuserdata(L,1) ? **(AttrObject**)luaL_checkudata(L, 1, "Context")
AttrObject obj{ lua_isuserdata(L,1) ? *(AttrObject*)luaL_checkudata(L, 1, "Context")
: lua_istable(L, 1) ? AnysTable(lua_to_table(L,1))
: AttrObject{} };
if (lua_isnoneornil(L, 2)) {
Expand Down
1 change: 1 addition & 0 deletions Dice/GlobalVar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ const dict_ci<> HelpDoc = {
{"game",R"(游戏模式:
`.game new 桌名` 创建游戏(桌名可省略,前缀以`规则:`可以指定应用规则)
例: `.game new DND:`
创建者自动视为GM
`.game over` 销毁本桌游戏
`.game state` 查看本桌状态
`.game master` 登记为GM
Expand Down

0 comments on commit e44149d

Please sign in to comment.