Blame SOURCES/tigervnc-fix-typo-in-mirror-monitor-detection.patch

324a25
From 2daf4126882f82b6e392dfbae87205dbdc559c3d Mon Sep 17 00:00:00 2001
324a25
From: Pierre Ossman <ossman@cendio.se>
324a25
Date: Thu, 23 Dec 2021 15:58:00 +0100
324a25
Subject: [PATCH] Fix typo in mirror monitor detection
324a25
324a25
Bug introduced in fb561eb but still somehow passed manual testing.
324a25
Resulted in some stray reads off the end of the stack, which were
324a25
hopefully harmless.
324a25
---
324a25
 vncviewer/MonitorIndicesParameter.cxx | 8 ++++----
324a25
 1 file changed, 4 insertions(+), 4 deletions(-)
324a25
324a25
diff --git a/vncviewer/MonitorIndicesParameter.cxx b/vncviewer/MonitorIndicesParameter.cxx
324a25
index 5130831cb..4ac74dd1a 100644
324a25
--- a/vncviewer/MonitorIndicesParameter.cxx
324a25
+++ b/vncviewer/MonitorIndicesParameter.cxx
324a25
@@ -211,13 +211,13 @@ std::vector<MonitorIndicesParameter::Monitor> MonitorIndicesParameter::fetchMoni
324a25
         // Only keep a single entry for mirrored screens
324a25
         match = false;
324a25
         for (int j = 0; j < ((int) monitors.size()); j++) {
324a25
-            if (monitors[i].x != monitor.x)
324a25
+            if (monitors[j].x != monitor.x)
324a25
                 continue;
324a25
-            if (monitors[i].y != monitor.y)
324a25
+            if (monitors[j].y != monitor.y)
324a25
                 continue;
324a25
-            if (monitors[i].w != monitor.w)
324a25
+            if (monitors[j].w != monitor.w)
324a25
                 continue;
324a25
-            if (monitors[i].h != monitor.h)
324a25
+            if (monitors[j].h != monitor.h)
324a25
                 continue;
324a25
324a25
             match = true;