MOD: Corrected condition in getSon to handle the root of the taxonomy
git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPCR/trunk@422 60f365c0-8329-0410-b2a4-ec073aeeaa1d
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
static void printresult(ecotx_t *taxon,econame_t* name,ecotaxonomy_t *taxonomy)
|
||||
{
|
||||
char* rankname;
|
||||
char* classname;
|
||||
char* classname;
|
||||
char* matchedname=taxon->name;
|
||||
|
||||
classname="scientific name";
|
||||
@ -45,6 +45,7 @@ static void printheader(void)
|
||||
"scientific name");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* display son's list for given taxon
|
||||
**/
|
||||
@ -57,7 +58,8 @@ static void get_son(ecotaxonomy_t *taxonomy, ecotx_t *taxon, int32_t *count, cha
|
||||
i < taxonomy->taxons->count;
|
||||
i++, current_taxon++)
|
||||
{
|
||||
if (taxon->taxid == current_taxon->parent->taxid)
|
||||
|
||||
if (taxon != current_taxon && taxon->taxid == current_taxon->parent->taxid)
|
||||
{
|
||||
if (rankname == NULL || !strcmp(rankname,taxonomy->ranks->label[current_taxon->rank]))
|
||||
{
|
||||
|
Reference in New Issue
Block a user