Hi!
Here's a patch for this issue. From gdb:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f872627f6f0 (LWP 30705)]
0x0000000000400ec9 in main (argc=5, argv=0x7fff2e29b938)
at impulse_grabber.c:111
111 if (*optarg == 'c' || *optarg == 'C') {
optarg is NULL, since the optstring doesn't state the requirement for
this argument. The patch simply tells getopt to care.
I'm also forwarding this fix to upstream.
Thanks.
--
mail: [email protected] http://adi.thur.de PGP/GPG: key via keyserver
Ich sei, gewaehret mir die Bitte, in eurem Netzwerk der Dritte.
Index: example-clients/impulse_grabber.c
===================================================================
--- example-clients/impulse_grabber.c (revision 3474)
+++ example-clients/impulse_grabber.c (working copy)
@@ -88,7 +88,7 @@
int c;
extern int optind, opterr;
int show_usage = 0;
- char *optstring = "d:f";
+ char *optstring = "d:f:";
struct option long_options[] = {
{ "help", 1, 0, 'h' },
{ "duration", 1, 0, 'd' },