From 8b455b095475cd181fc22882f8422babe1b9c74a Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Tue, 5 Jun 2007 13:38:33 +0000 Subject: [PATCH] git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPCR/branches/refactoring@34 60f365c0-8329-0410-b2a4-ec073aeeaa1d --- src/libecoPCR/ecotax.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libecoPCR/ecotax.c b/src/libecoPCR/ecotax.c index 4da5142..813c490 100644 --- a/src/libecoPCR/ecotax.c +++ b/src/libecoPCR/ecotax.c @@ -208,12 +208,13 @@ int eco_isundertaxon(ecotx_t *taxon, ecotx_t *next_parent; next_parent = taxon->parent; - - while ( (other_taxid != next_parent->taxid) && (next_parent!=0) ) + + while ( (other_taxid != next_parent->taxid) && + (strcmp(next_parent->name, "root")) ) { next_parent = next_parent->parent; } - + if (other_taxid == next_parent->taxid) return 1; else