Match line length in row inversion with Image constructor

pull/1111/head
Andrew Tribick 2021-07-31 14:20:00 +02:00 committed by Hleb Valoshka
parent 8153d2b5b4
commit f5f8d895db
1 changed files with 1 additions and 0 deletions

View File

@ -5535,6 +5535,7 @@ bool Renderer::captureFrame(int x, int y, int w, int h, PixelFormat format, unsi
if (!gl::MESA_pack_invert)
{
int realWidth = w * formatWidth(format);
realWidth = (realWidth + 3) & ~0x3;
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
uint8_t tempLine[realWidth]; // G++ supports VLA as an extension
#else