Skip to content

Commit

Permalink
Merge pull request #43 from BradyBrenot/master
Browse files Browse the repository at this point in the history
fix Win32 issue: disconnected monitors on would cause vector bounds exception
  • Loading branch information
smasherprog authored Jan 30, 2018
2 parents f4e2fa1 + b9d3210 commit 2770b35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/windows/GetMonitors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace Screen_Capture {
break;
}
ret.push_back(
CreateMonitor(i, i, devMode.dmPelsHeight, devMode.dmPelsWidth, devMode.dmPosition.x, devMode.dmPosition.y, name, scale));
CreateMonitor(static_cast<int>(ret.size()), i, devMode.dmPelsHeight, devMode.dmPelsWidth, devMode.dmPosition.x, devMode.dmPosition.y, name, scale));
}
}
return ret;
Expand Down

0 comments on commit 2770b35

Please sign in to comment.