- SZ_Clear(&net_message);
- MSG_WriteLong (&net_message, 0);
- MSG_WriteByte (&net_message, CCREQ_RCON);
- SZ_Write(&net_message, (const unsigned char*)rcon_password.string, n);
- MSG_WriteByte (&net_message, 0); // terminate the (possibly partial) string
- MSG_WriteString (&net_message, Cmd_Args());
- StoreBigLong(net_message.data, NETFLAG_CTL | (net_message.cursize & NETFLAG_LENGTH_MASK));
- NetConn_Write(mysocket, net_message.data, net_message.cursize, &to);
- SZ_Clear (&net_message);
+ sizebuf_t buf;
+ unsigned char bufdata[64];
+ buf.data = bufdata;
+ SZ_Clear(&buf);
+ MSG_WriteLong(&buf, 0);
+ MSG_WriteByte(&buf, CCREQ_RCON);
+ SZ_Write(&buf, (const unsigned char*)rcon_password.string, n);
+ MSG_WriteByte(&buf, 0); // terminate the (possibly partial) string
+ MSG_WriteString(&buf, Cmd_Args());
+ StoreBigLong(buf.data, NETFLAG_CTL | (buf.cursize & NETFLAG_LENGTH_MASK));
+ NetConn_Write(mysocket, buf.data, buf.cursize, &to);
+ SZ_Clear(&buf);