From guest  Thu Jun 30 09:00:36 1994
From: alon@bvr.co.il (Alon Rosenfeld 18 Hatzedef street Jaffa )
Message-Id: <9406301848.ZM20075@rea1.bvr.co.il>
Date: Thu, 30 Jun 1994 18:48:41 +0000
X-Mailer: Z-Mail (3.1.0 22feb94 MediaMail)
To: info-performer@sgi.sgi.com
Subject: bug in pfuTraverse()
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Status: OR


Hi,

I believe that there is a bug in the pfuTraverse() routine.

The bug is such that every time the routine recursively enters itself, it
writes the node (given as a parameter) into trav->node. The fact that trav is a
pointer to a single copy of the trav structure (initially passed by the user)
causes the last assignment of trav->node to hold and in turn the postFunc will
get a trav pointer with a wrong node pointer (that of the last visited node in
the recursion).

I fixed it as follows:

pfuTraverse(pfNode *node, pfuTraverser *trav)
{
pfMatrix mat;
 .
 .
pfNode  *keep_node;

	keep_node = trav->node;
	trav->node =  (pfNode *)node;
	.
	.
	.
	.

	.
	if (trav->postFunc)
	(*trav->postFunc)(trav);

	trav -> node = keep_node;
	return PFTRAV_CONT;
}


Thats it I guess


Alon





From guest  Thu Jun 30 11:52:33 1994
Message-Id: <9406301852.AA24688@surreal.asd.sgi.com>
To: alon@bvr.co.il (Alon Rosenfeld 18 Hatzedef street Jaffa )
Cc: info-performer
Subject: Re: bug in pfuTraverse() 
In-Reply-To: Your message of "Thu, 30 Jun 94 18:48:41 -0000."
             <9406301848.ZM20075@rea1.bvr.co.il> 
Date: Thu, 30 Jun 94 11:52:30 -0700
From: Jim Helman <jimh@surreal>
Status: OR


Correct.  It's now fixed for the next release.

thanks,

-jim helman

jimh@surreal.asd.sgi.com
415/390-1151



