[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13222] trunk/blender/source/blender/ blenlib/intern/arithb.c: Bugfix, un-initialized variables for tubemap and spheremap mapping, affected textures

Campbell Barton ideasman42 at gmail.com
Sun Jan 13 19:13:39 CET 2008


Revision: 13222
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13222
Author:   campbellbarton
Date:     2008-01-13 19:13:39 +0100 (Sun, 13 Jan 2008)

Log Message:
-----------
Bugfix, un-initialized variables for tubemap and spheremap mapping, affected textures

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/arithb.c

Modified: trunk/blender/source/blender/blenlib/intern/arithb.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/arithb.c	2008-01-13 15:10:09 UTC (rev 13221)
+++ trunk/blender/source/blender/blenlib/intern/arithb.c	2008-01-13 18:13:39 UTC (rev 13222)
@@ -3415,6 +3415,8 @@
 	len= sqrt(x*x+y*y);
 	if(len>0) {
 		*u = (1.0 - (atan2(x/len,y/len) / M_PI)) / 2.0;
+	} else {
+		*v = *u = 0.0f; /* to avoid un-initialized variables */
 	}
 }
 
@@ -3432,6 +3434,8 @@
 		
 		z/=len;
 		*v = 1.0- saacos(z)/M_PI;
+	} else {
+		*v = *u = 0.0f; /* to avoid un-initialized variables */
 	}
 }
 





More information about the Bf-blender-cvs mailing list