getopt_long returns int, don't cast to char.
On ARM, casting -1 to char turns it into something else. Fixes argument parsing on ARM. Thanks Chipaca for reporting.
This commit is contained in:
parent
fdf6d7af2a
commit
65795be0a9
2
i3lock.c
2
i3lock.c
|
@ -550,7 +550,7 @@ int main(int argc, char *argv[]) {
|
||||||
struct pam_conv conv = {conv_callback, NULL};
|
struct pam_conv conv = {conv_callback, NULL};
|
||||||
int nscreen;
|
int nscreen;
|
||||||
int curs_choice = CURS_NONE;
|
int curs_choice = CURS_NONE;
|
||||||
char o;
|
int o;
|
||||||
int optind = 0;
|
int optind = 0;
|
||||||
struct option longopts[] = {
|
struct option longopts[] = {
|
||||||
{"version", no_argument, NULL, 'v'},
|
{"version", no_argument, NULL, 'v'},
|
||||||
|
|
Loading…
Reference in New Issue