opt: initial new memory bytes

This commit is contained in:
taynpg 2025-04-09 19:29:12 +08:00
parent 797f8f164e
commit 49d6ad1974

View File

@ -158,6 +158,7 @@ void serialize(CMessageInfo& msg_info, char** out_buf, int& len, bool reuse_mem)
*out_buf = new char[len];
}
std::memset(*out_buf, 0x0, kz + 1);
char* ptr = *out_buf + kz + 1;
// 序列化 cmd