- cmd_argv[cmd_argc] = Z_Malloc (strlen(com_token)+1);
- strcpy (cmd_argv[cmd_argc], com_token);
+ l = strlen(com_token) + 1;
+ if (pos + l > CMD_TOKENIZELENGTH)
+ Sys_Error("Cmd_TokenizeString: ran out of %i character buffer space for command arguements\n", CMD_TOKENIZELENGTH);
+ strcpy (cmd_tokenizebuffer + pos, com_token);
+ cmd_argv[cmd_argc] = cmd_tokenizebuffer + pos;
+ pos += l;