summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/common/outbound.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/outbound.c b/src/common/outbound.c
index 8d32cf38..8181bd8a 100644
--- a/src/common/outbound.c
+++ b/src/common/outbound.c
@@ -1168,7 +1168,9 @@ menu_is_mainmenu_root (char *path, gint16 *offset)
 	{
 		if (!strncmp (path, menus[i] + 1, menus[i][0]))
 		{
-			*offset = menus[i][0] + 1;	/* number of bytes to offset the root */
+			*offset = menus[i][0];	/* number of bytes to offset the root */
+			if (path[*offset] != '\0')
+				*offset += 1;
 			return 0;	/* is not main menu */
 		}
 	}