[Scummvm-git-logs] scummvm branch-2-5 -> 38fed282cd9c195b4b969f1a33e4825df4aca2b4
aquadran
noreply at scummvm.org
Wed Dec 1 21:40:51 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f1f89173f2 TINYGL: Fixed reading outside of buffer
38fed282cd TINYGL: Fixed mismatch malloc/new
Commit: f1f89173f2e8ad51cd0b4cc848ddfd187ce4d5aa
https://github.com/scummvm/scummvm/commit/f1f89173f2e8ad51cd0b4cc848ddfd187ce4d5aa
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2021-12-01T22:40:21+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);
}
Commit: 38fed282cd9c195b4b969f1a33e4825df4aca2b4
https://github.com/scummvm/scummvm/commit/38fed282cd9c195b4b969f1a33e4825df4aca2b4
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2021-12-01T22:40:31+01:00
Commit Message:
TINYGL: Fixed mismatch malloc/new
Changed paths:
graphics/tinygl/zbuffer.cpp
diff --git a/graphics/tinygl/zbuffer.cpp b/graphics/tinygl/zbuffer.cpp
index b925eaafc1..62df6ae4ef 100644
--- a/graphics/tinygl/zbuffer.cpp
+++ b/graphics/tinygl/zbuffer.cpp
@@ -118,7 +118,7 @@ FrameBuffer::FrameBuffer(int width, int height, const Graphics::PixelFormat &for
this->_zbuf = (unsigned int *)gl_malloc(size);
memset(this->_zbuf, 0, size);
- byte *pixelBuffer = (byte *)gl_malloc(this->ysize * this->linesize);
+ byte *pixelBuffer = new byte[this->ysize * this->linesize];
this->pbuf.set(this->cmode, pixelBuffer);
this->frame_buffer_allocated = 1;
More information about the Scummvm-git-logs
mailing list