[Scummvm-git-logs] scummvm master -> 4cea5706d0d6479132536f2ff4ec9acf3fda1d21

aquadran noreply at scummvm.org
Sun Sep 18 15:31:05 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4cea5706d0 GRAPHICS, OPENGL: Fixed static analysis issue report


Commit: 4cea5706d0d6479132536f2ff4ec9acf3fda1d21
    https://github.com/scummvm/scummvm/commit/4cea5706d0d6479132536f2ff4ec9acf3fda1d21
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-09-18T17:30:57+02:00

Commit Message:
GRAPHICS, OPENGL: Fixed static analysis issue report

Changed paths:
    graphics/tinygl/fog.cpp


diff --git a/graphics/tinygl/fog.cpp b/graphics/tinygl/fog.cpp
index 3a5b664ddf4..c17820a0829 100644
--- a/graphics/tinygl/fog.cpp
+++ b/graphics/tinygl/fog.cpp
@@ -82,10 +82,11 @@ void GLContext::gl_calc_fog_factor(GLVertex *v) {
 		v->fog_factor = expf(-(fog_density * fog_density * eye_distance * eye_distance));
 		break;
 	default:
+		v->fog_factor = 0;
 		break;
 	}
 
-	clampf(v->fog_factor, 0.0f, 1.0f);
+	v->fog_factor = clampf(v->fog_factor, 0.0f, 1.0f);
 }
 
 } // end of namespace TinyGL




More information about the Scummvm-git-logs mailing list