GOT THE TIME TICK TICK TICKIN' IN MY HEAD
This commit is contained in:
@@ -409,11 +409,6 @@ void netprot::Serialize(Chat* chat, char* buf[], uint32_t* buflen) {
|
||||
|
||||
strcpy(*buf + 1 + sizeof(uint64_t) * 3, messize, chat->mess);
|
||||
|
||||
//memcpy(*buf + 1 + sizeof(uint64_t) * 3, &chat->mess, messize);
|
||||
|
||||
for (int x = 0; x < sizeof(Chat); ++x)
|
||||
std::cout << *(*buf + x);
|
||||
|
||||
*buflen = messize + sizeof(uint64_t) * 3 + 2;
|
||||
}
|
||||
|
||||
@@ -935,12 +930,9 @@ bool netprot::Deserialize(Chat* chat, char* buf, uint32_t *buflen) {
|
||||
if (messsize > 140)
|
||||
return false;
|
||||
|
||||
for (int x = 0; x < 140; ++x)
|
||||
std::cout << buf[sizeof(uint64_t) * 3 + x];
|
||||
strcpy(chat->mess, messsize, &buf[1 + sizeof(uint64_t) * 3]);
|
||||
|
||||
memcpy(&chat->mess, &buf[1 + sizeof(uint64_t) * 3], messsize);
|
||||
|
||||
*buflen = messsize + sizeof(uint64_t) * 3 + 2;
|
||||
*buflen = messsize + sizeof(uint64_t) * 3 + 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user