I should learn to get such stuff right without the need to draw
the memory layout with boxes and lines on paper ...
Thanks to the test suite for catching this one!
char *sequences_s = NULL;
int argc = 0;
char *argv[MAXARGS];
- char *cp;
+ char **seqp;
char buf[BUFSIZ];
if (cur == NULL || cur[0] == '\0') {
argv[argc++] = "scan";
snprintf(buf, sizeof buf, "+%s", node->n_name);
argv[argc++] = buf;
- for (cp=*sequences; *cp; cp++) {
- argv[argc++] = cp;
+ for (seqp=sequences; *seqp; seqp++) {
+ argv[argc++] = *seqp;
}
argv[argc] = (char *)NULL;
execprog(*argv, argv);