Pleurer en chat.
This commit is contained in:
parent
449e12ca5a
commit
d1805f2309
@ -925,14 +925,16 @@ bool netprot::Deserialize(Chat* chat, char* buf, uint32_t *buflen) {
|
||||
(uint64_t)dstt[6] << 8 |
|
||||
(uint64_t)dstt[7];
|
||||
|
||||
size_t messsize = std::strlen(buf + sizeof(uint64_t) * 3) + 1;
|
||||
size_t messsize = std::strlen(&buf[sizeof(uint64_t) * 3]) + 1;
|
||||
|
||||
if (messsize > 140)
|
||||
return false;
|
||||
|
||||
std::cout << messsize << ": " << &buf[1 + sizeof(uint64_t) * 3] << std::endl;
|
||||
|
||||
strcpy(chat->mess, messsize, &buf[1 + sizeof(uint64_t) * 3]);
|
||||
|
||||
*buflen = messsize + sizeof(uint64_t) * 3 + 1;
|
||||
//*buflen = messsize + sizeof(uint64_t) * 3 + 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user