mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 13:52:57 +00:00
[hosts] nvfbc: exit loop early if ystart is > then dataHeight
This commit is contained in:
parent
8630fd20ad
commit
cb849b287c
1 changed files with 6 additions and 2 deletions
|
@ -723,8 +723,12 @@ static CaptureResult nvfbc_getFrame(FrameBuffer * frame, int frameIndex)
|
|||
for (unsigned int y = 0; y < h; ++y)
|
||||
{
|
||||
const unsigned int ystart = y << this->diffShift;
|
||||
const unsigned int yend = min(this->dataHeight, (y + 1)
|
||||
<< this->diffShift);
|
||||
if (ystart > this->dataHeight)
|
||||
break;
|
||||
|
||||
const unsigned int yend = min(
|
||||
this->dataHeight,
|
||||
(y + 1) << this->diffShift);
|
||||
|
||||
for (unsigned int x = 0; x < w; )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue