Re: memory deallocation bug

Following up on my earlier report of memory problems: it turned out to be a
code generation bug in gcc. The gcc maintainers will have the report as soon
as I find a way of getting past the message size limit on their mailing list.

Meanwhile, here is a patch that doesn't confuse gcc and saves two lines
of source code (at no loss in functionality).

--- pristine/Amaya/thotlib/view/boxrelations.c	Mon Apr 17 12:05:22 2000
+++ ./Amaya/thotlib/view/boxrelations.c	Mon May  1 20:48:38 2000
@@ -2372,11 +2372,9 @@
 		     while (j < MAX_RELAT_POS)
 		       {
 			  k = j + 1;
-			  pPosRel->PosRTable[j - 1].ReBox = pPosRel->PosRTable[k - 1].ReBox;
-			  pPosRel->PosRTable[j - 1].ReRefEdge = pPosRel->PosRTable[k - 1].ReRefEdge;
-			  pPosRel->PosRTable[j - 1].ReOp = pPosRel->PosRTable[k - 1].ReOp;
+			  pPosRel->PosRTable[j - 1] = pPosRel->PosRTable[k - 1];
 			  if (pPosRel->PosRTable[k - 1].ReBox == NULL)
-			     j = MAX_RELAT_POS;
+			     break;
 			  else
 			    {
 			       j++;

Received on Tuesday, 2 May 2000 02:49:32 UTC