From 0c077a76d1a8ce50e889c2caa31815c59926bda3 Mon Sep 17 00:00:00 2001 From: Richard Grenville Date: Tue, 11 Sep 2012 23:11:23 +0800 Subject: Bug fix: Segfault when encountering invalid long option I didn't read the documentation of getopt_long() carefully. --- compton.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compton.c b/compton.c index 9e1eef336..a281b31b3 100644 --- a/compton.c +++ b/compton.c @@ -2594,6 +2594,8 @@ main(int argc, char **argv) { { "shadow-green", required_argument, NULL, 0 }, { "shadow-blue", required_argument, NULL, 0 }, { "inactive-opacity-override", no_argument, NULL, 0 }, + // Must terminate with a NULL entry + { NULL, 0, NULL, 0 }, }; XEvent ev; -- cgit v1.2.1