aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2021-12-23 15:58:00 +0100
committerPierre Ossman <ossman@cendio.se>2021-12-23 15:59:27 +0100
commit2daf4126882f82b6e392dfbae87205dbdc559c3d (patch)
tree47bcfe38d73c6f0e91ee3fec3874af91ae97fb29
parentfabea0a092b1891024875e6c5d7beca7c7f8ee4f (diff)
downloadtigervnc-2daf4126882f82b6e392dfbae87205dbdc559c3d.tar.gz
tigervnc-2daf4126882f82b6e392dfbae87205dbdc559c3d.zip
Fix typo in mirror monitor detection
Bug introduced in fb561eb but still somehow passed manual testing. Resulted in some stray reads off the end of the stack, which were hopefully harmless.
-rw-r--r--vncviewer/MonitorIndicesParameter.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vncviewer/MonitorIndicesParameter.cxx b/vncviewer/MonitorIndicesParameter.cxx
index 5130831c..4ac74dd1 100644
--- a/vncviewer/MonitorIndicesParameter.cxx
+++ b/vncviewer/MonitorIndicesParameter.cxx
@@ -211,13 +211,13 @@ std::vector<MonitorIndicesParameter::Monitor> MonitorIndicesParameter::fetchMoni
// Only keep a single entry for mirrored screens
match = false;
for (int j = 0; j < ((int) monitors.size()); j++) {
- if (monitors[i].x != monitor.x)
+ if (monitors[j].x != monitor.x)
continue;
- if (monitors[i].y != monitor.y)
+ if (monitors[j].y != monitor.y)
continue;
- if (monitors[i].w != monitor.w)
+ if (monitors[j].w != monitor.w)
continue;
- if (monitors[i].h != monitor.h)
+ if (monitors[j].h != monitor.h)
continue;
match = true;