]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added some memory corruption checks, trying to find a bug
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 21 Jan 2002 02:09:24 +0000 (02:09 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 21 Jan 2002 02:09:24 +0000 (02:09 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1371 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index 3a689286de1915d488689963f3d1dfd2fbd2ff8b..dfc3fa02b7a9f95e00e0ddd601000bde8d6134b0 100644 (file)
@@ -1736,6 +1736,9 @@ static winding_t *ClipWinding (winding_t *in, mplane_t *split, int keepon)
        winding_t       *neww;
        int             maxpts;
 
+       // debugging
+       Mem_CheckSentinels(in);
+
        counts[SIDE_FRONT] = counts[SIDE_BACK] = counts[SIDE_ON] = 0;
 
        // determine sides for each point
@@ -1811,6 +1814,9 @@ static winding_t *ClipWinding (winding_t *in, mplane_t *split, int keepon)
        // free the original winding
        FreeWinding (in);
 
+       // debugging
+       Mem_CheckSentinels(neww);
+
        return neww;
 }
 
@@ -1837,6 +1843,9 @@ static void DivideWinding (winding_t *in, mplane_t *split, winding_t **front, wi
        winding_t       *f, *b;
        int             maxpts;
 
+       // debugging
+       Mem_CheckSentinels(in);
+
        counts[SIDE_FRONT] = counts[SIDE_BACK] = counts[SIDE_ON] = 0;
 
        // determine sides for each point
@@ -1920,6 +1929,10 @@ static void DivideWinding (winding_t *in, mplane_t *split, winding_t **front, wi
                VectorCopy (mid, b->points[b->numpoints]);
                b->numpoints++;
        }
+
+       // debugging
+       Mem_CheckSentinels(front);
+       Mem_CheckSentinels(back);
 }
 
 typedef struct portal_s