数据区指针不想等时才拷贝

This commit is contained in:
nnhy 2015-08-27 02:21:34 +00:00
parent 46a1c6db69
commit c217b0904b
1 changed files with 1 additions and 1 deletions

View File

@ -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);