mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
TINYGL: Fixed reading outside of buffer
This commit is contained in:
parent
789825386a
commit
8422a9720e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user