mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
restored forums workign state. Sorry for that, I introduced this bug myself in commit 1394
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1618 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7c39ba9e0c
commit
67d2fac2df
@ -141,14 +141,17 @@ bool RsTlvBinaryData::SetTlv(void *data, uint32_t size, uint32_t *offset) /*
|
|||||||
ok &= SetTlvBase(data, tlvend, offset, tlvtype, tlvsize);
|
ok &= SetTlvBase(data, tlvend, offset, tlvtype, tlvsize);
|
||||||
|
|
||||||
/* add mandatory data */
|
/* add mandatory data */
|
||||||
if ((bin_data != NULL) && (bin_len))
|
|
||||||
|
// Warning: this is actually not an error if bin_len=0, as it does not
|
||||||
|
// corrupt the packet structure. We thus still return true in this case.
|
||||||
|
//
|
||||||
|
if (bin_data != NULL && bin_len > 0)
|
||||||
{
|
{
|
||||||
memcpy(&(((uint8_t *) data)[*offset]), bin_data, bin_len);
|
memcpy(&(((uint8_t *) data)[*offset]), bin_data, bin_len);
|
||||||
*offset += bin_len;
|
*offset += bin_len;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return false ;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user