From 85595b8c524aad2e38b6b16e5db12b1bf2097898 Mon Sep 17 00:00:00 2001 From: Cyd Date: Sat, 11 Jul 2026 22:06:37 -0500 Subject: [PATCH] Console: fix volume menu check-mark off-by-one (original 4.11.3 bug) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mnuVolume_DropDownOpening checked the item where i+1 == num/10, but the items are index=level (rVolumeItems[0]="mute", [8]="80"), so the mark sat one step below the reported volume and mute (0) never got a mark. Set path was always correct — display only. Now checks i == num/10. Faithful reproduction of a bug in the original decompiled console; fixed here. Verified live: console reports 80 -> "80" checked, mute -> "mute" checked, against vPOD. 106/106 diff tests unaffected. Co-Authored-By: Claude Fable 5 --- Console/TeslaConsole/SitePanel.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Console/TeslaConsole/SitePanel.cs b/Console/TeslaConsole/SitePanel.cs index c2b33e0..a19bdab 100644 --- a/Console/TeslaConsole/SitePanel.cs +++ b/Console/TeslaConsole/SitePanel.cs @@ -1516,7 +1516,11 @@ internal class SitePanel : DockContent for (int i = 0; i < rVolumeItems.Length; i++) { mnuVolume.DropDownItems.Add(rVolumeItems[i]); - ((ToolStripMenuItem)mnuVolume.DropDownItems[i]).Checked = i + 1 == num / 10; + // Item i displays i*10 ("mute" at 0), so the reported level maps to + // index num/10 directly. The original console checked i+1 here — the + // mark sat one step below the actual volume, and mute (0) never got + // a mark at all. Original bug (4.11.3), fixed 2026-07-11. + ((ToolStripMenuItem)mnuVolume.DropDownItems[i]).Checked = i == num / 10; } }