int cmd;
int i;
byte cmdlog[32];
- char *cmdlogname[32];
+ char *cmdlogname[32], *temp;
int cmdindex, cmdcount = 0;
//
// if the high bit of the command byte is set, it is a fast update
if (cmd & 128)
{
- cmdlogname[cmdindex] = "svc_entity";
+ // LordHavoc: fix for bizarre problem in MSVC that I do not understand (if I assign the string pointer directly it ends up storing a NULL pointer)
+ temp = "svc_entity";
+ cmdlogname[cmdindex] = temp;
SHOWNET("fast update");
CL_ParseUpdate (cmd&127);
continue;
SHOWNET(svc_strings[cmd]);
cmdlogname[cmdindex] = svc_strings[cmd];
if (!cmdlogname[cmdindex])
- cmdlogname[cmdindex] = "<unknown>";
+ {
+ // LordHavoc: fix for bizarre problem in MSVC that I do not understand (if I assign the string pointer directly it ends up storing a NULL pointer)
+ temp = "<unknown>";
+ cmdlogname[cmdindex] = temp;
+ }
// other commands
switch (cmd)