mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-21 21:17:19 +00:00
[hosts] nvfbc: exit loop early if ystart is > then dataHeight
This commit is contained in:
parent
8630fd20ad
commit
cb849b287c
@ -723,8 +723,12 @@ static CaptureResult nvfbc_getFrame(FrameBuffer * frame, int frameIndex)
|
|||||||
for (unsigned int y = 0; y < h; ++y)
|
for (unsigned int y = 0; y < h; ++y)
|
||||||
{
|
{
|
||||||
const unsigned int ystart = y << this->diffShift;
|
const unsigned int ystart = y << this->diffShift;
|
||||||
const unsigned int yend = min(this->dataHeight, (y + 1)
|
if (ystart > this->dataHeight)
|
||||||
<< this->diffShift);
|
break;
|
||||||
|
|
||||||
|
const unsigned int yend = min(
|
||||||
|
this->dataHeight,
|
||||||
|
(y + 1) << this->diffShift);
|
||||||
|
|
||||||
for (unsigned int x = 0; x < w; )
|
for (unsigned int x = 0; x < w; )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user