[Bf-blender-cvs] [9a7da1242d9] master: Fix uninitialized value

Aaron Carlisle noreply at git.blender.org
Fri Nov 6 07:11:28 CET 2020


Commit: 9a7da1242d9f44a085b8b0d0bab989f4eb945270
Author: Aaron Carlisle
Date:   Fri Nov 6 00:34:33 2020 -0500
Branches: master
https://developer.blender.org/rB9a7da1242d9f44a085b8b0d0bab989f4eb945270

Fix uninitialized value

Own mistake in rB74188e65028d268af887ab2140e4253087410c1e

===================================================================

M	source/blender/blenlib/intern/noise.c

===================================================================

diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index cca08feee0d..f9b6218eae5 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -1263,7 +1263,7 @@ float BLI_noise_generic_turbulence(
     z *= noisesize;
   }
 
-  float sum = 0, amp, fscale = 1;
+  float sum = 0, amp = 1, fscale = 1;
   for (int i = 0; i <= oct; i++, amp *= 0.5f, fscale *= 2.0f) {
     float t = noisefunc(fscale * x, fscale * y, fscale * z);
     if (hard) {



More information about the Bf-blender-cvs mailing list