PMAXLEN
tchar command[PMAXLEN+4];
if (cmdlen >= PMAXLEN)
if (cmdlen + i >= PMAXLEN) {
cmdlen = PMAXLEN;