[Bf-committers] small (but irritating) bug in convertblender.c

Stealth Apprentice stealthapprentice at yahoo.com
Sun Feb 5 19:34:28 CET 2006

acc isn't used in the for-loop below, but is
incremented. In VS2005, that causes a break into the
debugger telling you that uninitialized memory is
being accessed. The fix is to remove acc+=2

static void calc_edge_stress(Render *re, Mesh *me, int
startvert, int startvlak)
	float loc[3], size[3], *accum, *acc, *accumoffs,
	int a;
	if(startvert==re->totvert) return;
	mesh_get_texspace(me, loc, NULL, size);
"temp accum for stress");
	/* de-normalize orco */
	for(a=startvert; a<re->totvert; a++, acc+=2) {
		VertRen *ver= RE_findOrAddVert(re, a);
		if(ver->orco) {
			ver->orco[0]= ver->orco[0]*size[0] +loc[0];
			ver->orco[1]= ver->orco[1]*size[1] +loc[1];
			ver->orco[2]= ver->orco[2]*size[2] +loc[2];

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Bf-committers mailing list