* Bad loading by TlvString - fixed.

* Enabled extra debugging in rstlvtypes as extra check



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1622 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2009-09-08 23:41:57 +00:00
parent 6842115258
commit 3b3c7c7ba4
2 changed files with 3 additions and 1 deletions

View File

@ -447,7 +447,7 @@ bool GetTlvString(void *data, uint32_t size, uint32_t *offset,
return false; return false;
} }
char *strdata = (char *) right_shift_void_pointer(tlvstart, 4); char *strdata = (char *) right_shift_void_pointer(tlvstart, TLV_HEADER_SIZE);
uint16_t strsize = tlvsize - TLV_HEADER_SIZE; /* remove the header */ uint16_t strsize = tlvsize - TLV_HEADER_SIZE; /* remove the header */
in = std::string(strdata, strsize); in = std::string(strdata, strsize);

View File

@ -33,6 +33,8 @@
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#define TLV_DEBUG 1
void RsTlvItem::TlvShallowClear() void RsTlvItem::TlvShallowClear()
{ {
TlvClear(); /* unless overloaded! */ TlvClear(); /* unless overloaded! */