From f95a8047fecc9bdde132b6b91a8c531febaefa65 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sat, 24 Dec 2005 23:52:12 +0000
Subject: [PATCH] Corrected off-by-one error in use of target button numbers.

---
 webdvd.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webdvd.cpp b/webdvd.cpp
index e2d8cb8..eb2a9b2 100644
--- a/webdvd.cpp
+++ b/webdvd.cpp
@@ -965,11 +965,12 @@ namespace
 			       && (target_menu_entries[--target_button_num]
 				   != this_pgc))
 			    ;
+			target_button_num += 1;
 		    }
 			 
 		    file << "g1 = "
 			 << (1 + target.index
-			     + (1 + target_button_num) * button_mult)
+			     + target_button_num * button_mult)
 			 << "; jump menu " << 1 + target.index << ";";
 		}
 		else
-- 
2.39.5