diff --git a/libretroshare/src/serialiser/rstlvbase.cc b/libretroshare/src/serialiser/rstlvbase.cc index 7c96ced48..d4674b1a5 100644 --- a/libretroshare/src/serialiser/rstlvbase.cc +++ b/libretroshare/src/serialiser/rstlvbase.cc @@ -447,7 +447,7 @@ bool GetTlvString(void *data, uint32_t size, uint32_t *offset, 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 */ in = std::string(strdata, strsize); diff --git a/libretroshare/src/serialiser/rstlvtypes.cc b/libretroshare/src/serialiser/rstlvtypes.cc index 2cdbb6c6d..1a489ff53 100644 --- a/libretroshare/src/serialiser/rstlvtypes.cc +++ b/libretroshare/src/serialiser/rstlvtypes.cc @@ -33,6 +33,8 @@ #include #include +#define TLV_DEBUG 1 + void RsTlvItem::TlvShallowClear() { TlvClear(); /* unless overloaded! */