Fix: when unable to parse the sequence string, erase everything.

Found with:   Coverity Prevent(tm)
CID:          7888
This commit is contained in:
edwin 2010-06-05 11:32:31 +00:00
parent 387baf087f
commit 4648b36108

View File

@ -141,12 +141,12 @@ setnsequences(char *seq)
for (i = 0; i < 5; i++) {
nsequences[i].name = p;
if ((p = strchr(p, ' ')) == NULL) {
/* Oh oh there is something wrong. Erase! Erase! */
for (i = 0; i < 5; i++) {
nsequences[i].name = NULL;
nsequences[i].len = 0;
return;
}
return;
}
*p = '\0';
p++;