[PATCH] wmmenugen: Fix segfault; argv[argc] doesn't exist.

Doug Torrance <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
---
 util/wmmenugen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/wmmenugen.c b/util/wmmenugen.c
index 5839189..47e89f7 100644
--- a/util/wmmenugen.c
+++ b/util/wmmenugen.c
@@ -106,7 +106,7 @@ int main(int argc, char **argv)
 	parse_locale(NULL, &env_lang, &env_ctry, &env_enc, &env_mod);
 	terminal = find_terminal_emulator();
 
-	for (i = 1; i <= argc; i++)
+	for (i = 1; i < argc; i++)
 	{
 		if (strncmp(argv[i], "-parser", 7) == 0 &&
 		    (argv[i][7] == '=' ||
-- 
2.7.4


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.