再加陷阱
This commit is contained in:
parent
2bb9e1f713
commit
2d250a4df2
|
@ -68,8 +68,10 @@ uint Controller::Dispatch(ITransport* port, byte* buf, uint len, void* param)
|
|||
Stream ms(buf, len);
|
||||
while(ms.Remain() >= control->MinSize)
|
||||
{
|
||||
assert_param2(_my == control, "控制器指针已被改变");
|
||||
// 如果不是有效数据包,则直接退出,避免产生死循环。当然,也可以逐字节移动测试,不过那样性能太差
|
||||
if(!control->Dispatch(ms, NULL)) break;
|
||||
assert_param2(_my == control, "控制器指针已被改变");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue