mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 22:51:39 +00:00
Fix buffer overrun
This commit is contained in:
parent
659abc9451
commit
2f3a6da295
1 changed files with 5 additions and 1 deletions
|
@ -2316,7 +2316,11 @@ bool OpenGLSWFrameBuffer::OpenGLPal::Update()
|
||||||
{
|
{
|
||||||
buff[i] = ColorARGB(pal[i].a, pal[i - 1].r, pal[i - 1].g, pal[i - 1].b);
|
buff[i] = ColorARGB(pal[i].a, pal[i - 1].r, pal[i - 1].g, pal[i - 1].b);
|
||||||
}
|
}
|
||||||
BorderColor = ColorARGB(pal[i].a, pal[i - 1].r, pal[i - 1].g, pal[i - 1].b);
|
if (numEntries > 1)
|
||||||
|
{
|
||||||
|
i = numEntries - 1;
|
||||||
|
BorderColor = ColorARGB(pal[i].a, pal[i - 1].r, pal[i - 1].g, pal[i - 1].b);
|
||||||
|
}
|
||||||
|
|
||||||
glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
|
glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER);
|
||||||
GLint oldBinding = 0;
|
GLint oldBinding = 0;
|
||||||
|
|
Loading…
Reference in a new issue