Commit c30c986b5df9d6600bf43ab5a99686b6b5984296
1 parent
e2b474f5
fix: searchAllRoleRpc协议 rsp判空
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
src/actions/RoleAction.lua
| @@ -534,6 +534,10 @@ function _M.searchAllRoleRpc(agent, data) | @@ -534,6 +534,10 @@ function _M.searchAllRoleRpc(agent, data) | ||
| 534 | if ret ~= 0 then return 2 end | 534 | if ret ~= 0 then return 2 end |
| 535 | 535 | ||
| 536 | local rsp = result.data | 536 | local rsp = result.data |
| 537 | + if not rsp or not next(rsp) then | ||
| 538 | + return 3 | ||
| 539 | + end | ||
| 540 | + | ||
| 537 | SendPacket(actionCodes.Role_searchAllRoleRpc, MsgPack.pack(rsp)) | 541 | SendPacket(actionCodes.Role_searchAllRoleRpc, MsgPack.pack(rsp)) |
| 538 | return true | 542 | return true |
| 539 | end | 543 | end |