]> source.dussan.org Git - tigervnc.git/commitdiff
Fix typo in mirror monitor detection
authorPierre Ossman <ossman@cendio.se>
Thu, 23 Dec 2021 14:58:00 +0000 (15:58 +0100)
committerPierre Ossman <ossman@cendio.se>
Thu, 23 Dec 2021 14:59:27 +0000 (15:59 +0100)
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.

vncviewer/MonitorIndicesParameter.cxx

index 5130831cb4a8e221c7fb6884c37a27b355e4a6b4..4ac74dd1ab7c5c8b7424c5e3d593de6c48dced20 100644 (file)
@@ -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;