数据区指针不想等时才拷贝
This commit is contained in:
parent
46a1c6db69
commit
c217b0904b
|
@ -16,7 +16,7 @@ void Message::SetData(byte* buf, uint len)
|
|||
//assert_param(len <= ArrayLength(Data));
|
||||
|
||||
Length = len;
|
||||
if(len > 0)
|
||||
if(len > 0 && buf != Data)
|
||||
{
|
||||
assert_ptr(buf);
|
||||
assert_ptr(Data);
|
||||
|
|
Loading…
Reference in New Issue