[Subject Prev][Subject Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hts-users:02952] A bug in HHEd.c


Hi,

I found a bug in HHEd.c. When we use -q option, a tree file output by ST command is not correct.
Please apply the attached patch code.

Best regards,

Kei Hashimoto 
--- HHEd.c	2011-07-19 14:08:41.000000000 +0900
+++ HHEd.c	2011-07-19 14:18:13.000000000 +0900
@@ -3982,14 +3982,22 @@
    }
 
    if (useRefTree>=0) {
-      if (useRefTree>=2)
+      if (useRefTree>=2) {
+         for (node=tree->leaf;node!=NULL;node=node->next) {
+            node->snum = -1;
+            node->yes  = NULL;
+            node->no   = NULL;
+            node->id   = NULL;
+	 }
          node=NULL;
+      }
       else {
          for (node=tree->leaf,j=1;node!=NULL;node=n,j++) {
             n = node->next;
             if (node->parent != NULL)
    	       node->parent->qlist = qList;
             ValidProbNode(node,threshold,FALSE);
+            node->snum= -1;
             node->yes = NULL;
             node->no  = NULL;
             node->next= NULL;