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:
csoler 2009-09-08 18:31:00 +00:00
parent 7c39ba9e0c
commit 67d2fac2df

View File

@ -141,14 +141,17 @@ bool RsTlvBinaryData::SetTlv(void *data, uint32_t size, uint32_t *offset) /*
ok &= SetTlvBase(data, tlvend, offset, tlvtype, tlvsize);
/* 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);
*offset += bin_len;
return true;
}
else
return false ;
return ok;
}