[Scummvm-git-logs] scummvm master -> 8422a9720eb9b95f6726849650306eeb62adc3eb
aquadran
noreply at scummvm.org
Sat Nov 27 00:09:47 UTC 2021
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:
8422a9720e TINYGL: Fixed reading outside of buffer
Commit: 8422a9720eb9b95f6726849650306eeb62adc3eb
https://github.com/scummvm/scummvm/commit/8422a9720eb9b95f6726849650306eeb62adc3eb
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2021-11-27T01:09:40+01:00
Commit Message:
TINYGL: Fixed reading outside of buffer
Changed paths:
graphics/tinygl/api.cpp
diff --git a/graphics/tinygl/api.cpp b/graphics/tinygl/api.cpp
index 27e4c95afd..3a83c0a31f 100644
--- a/graphics/tinygl/api.cpp
+++ b/graphics/tinygl/api.cpp
@@ -451,9 +451,12 @@ void tglLightfv(int light, int type, const float *v) {
p[0].op = TinyGL::OP_Light;
p[1].i = light;
p[2].i = type;
- // TODO: 3 composants
- for (int i = 0; i < 4; i++)
- p[3 + i].f = v[i];
+ for (int i = 0; i < 4; i++) {
+ if (type != TGL_SPOT_DIRECTION)
+ p[3 + i].f = v[i];
+ else
+ p[3 + i].f = 0.0f;
+ }
TinyGL::gl_add_op(p);
}
More information about the Scummvm-git-logs
mailing list