- commands = (commands == NULL) ? arg :
- strcat (strcat (commands, " "), arg);
+ //commands = (commands == NULL) ? arg :
+ // strcat (strcat (commands, " "), arg);
+ if (commands == NULL) {
+ commands = arg;
+ } else {
+ char *tmp = (char *) malloc (strlen (arg) + 1);
+ strcat (strcat (commands, " "), strcpy (tmp, arg));
+ free (tmp);
+ }