Commit 01d10772ece0c6ec34e74c01ee0394c1391a41ae
1 parent
d2d5ea42
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 | 534 | if ret ~= 0 then return 2 end |
| 535 | 535 | |
| 536 | 536 | local rsp = result.data |
| 537 | + if not rsp or not next(rsp) then | |
| 538 | + return 3 | |
| 539 | + end | |
| 540 | + | |
| 537 | 541 | SendPacket(actionCodes.Role_searchAllRoleRpc, MsgPack.pack(rsp)) |
| 538 | 542 | return true |
| 539 | 543 | end | ... | ... |