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

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